Having a small trouble with BambooHR to Entra ID

I’m creating workflows for integration of BambooHR with Entra ID.

So i had to divide my workflows, on 3 seperate workflows. I’ve created “create user” workflow, “update user” workflow and “delete user” workflow, also i set 3 webhooks in BambooHR because it doesn’t have events, just call them by status (active or inactive) and thats it.

Now i can check for update how to add “reporting to” into Entra ID node and in “create user” workflow how to add them into groups.
I have a problem with “reporting to” or “manager” in Entra ID node, it doesn’t exist.
Also, in “Create user” workflow (the one bellow) im trying to add them to groups but it says that distribution groups or security groups. So if you have any ideas?

Information on your n8n setup

  • **n8n version:1.80.3
  • **Database (default: SQLite):
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):
  • **Operating system:

Hi @Todor
I think your ‘Reporting To’ and ‘Manager’ attributes are custom user attributes because I don’t see them in the default user attribute list.

It looks like the Entra ID node lists just the default ones.

This part of the Microsoft article documentation says that they are accessible through the Microsoft Graph API so if the default Entra Id node doesn’t have them maybe you’ll be able to get them with an custom HTTP Request. :expressionless: :cry:

Oh, well. I’ve added HTTP Request node after the Entra ID node, set the parameters, i hope it’s going to work now. Thanks for the assistance.

If there is anything else later, I’ll ask :slight_smile:

1 Like

Hey if you make it work and you have the time please let me know.

Also if my comment helped you please consider marking it as the solution. It will help me level up my rank in the community and it will help other people with the same issue.
Thanks.

Well, gets a bit tricky. I kinda need help setting up HTTP request node for my problem with manager.

So, what URL do i add? Should I send Headers and Body?

1 Like

Hi,
For some reason I was mistaken that you were trying to get the ‘manager’ value not update it. Sorry for that :expressionless:

Looking at your update request it looks correct, headers, tokens, endpoints and all, but seems like you don’t have the necessary user ID and manager, user id for the update:
From the microsoft graph api documentation on assigning a manager to the user
id’s look like this: 10f17b99-784c-4526-8747-aec8a3159d6a

PUT https://graph.microsoft.com/v1.0/users/10f17b99-784c-4526-8747-aec8a3159d6a/manager/$ref
Content-type: application/json

{
  "@odata.id": "https://graph.microsoft.com/v1.0/users/6ea91a8d-e32e-41a1-b7bd-d2d185eed0e0"
}

To retrieve the user and manager id you will probably need to add 2 Microsoft Entra ID - Get Many Users’ nodes before the update to query by the available emails

  • User ID:
    • Filter: mail eq '{{ $json.workEmail }}' (replace {{ $json.workEmail }} with your email variable).
  • Manager ID:
    • Filter: mail eq '{{ $json.managerEmailFromBambooHR }}' (replace {{ $json.managerEmailFromBambooHR }} with the manager’s email variable from BambooHR)."
1 Like

So i need to add two more Microsoft Entra ID nodes? or just one? I’m a bit confused, kinda complicated myself this workflow. So, the flow would go like this: Webhook->BambooHR->Code->Update Reporting to (Http request node)->MS Entra ID Get Many Users x2?

1 Like

The update should go at the end. You need to lookup the user and manager ids first.

  1. Webhook
  2. Get BambooHR record
  3. Entra ID GetMany Users
    use the value from $("BambooHR").first().json["workEmail"] as a filter to lookup the user in Entra and get his id.
  4. Entra ID GetMany Users
    use the value from $("BambooHR").first().json["supervisor"] as a filter to lookup the manager user in Entra and get his id.
  5. Update Entra ID, use the collected Ids to update the manager



Not sure what you have in the ‘supervisor’ bamboo field. If it’s email it’s fine because emails are unique so you will be able to use it to lookup the same user in Entra.