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?
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.
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.
Hi,
For some reason I was mistaken that you were trying to get the ‘manager’ value not update it. Sorry for that
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
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)."
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?
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.
So, i still have trouble with this workflow for updating users.
What i have to put in update is next: City, Department, Job title, Display name(optional) and MANAGER.
I’ve put all of that in Entra update node, but for manager i go with this as you told me to. but i have to manually add every time user id or i can get it from API graph?
here is the test that im still having trouble with:
I moved it after the ‘get entra user’ node and updated the reference because you need an Entra user id to do an update, not an email.
Basically you use the emails to find the ids and then you work with the ids.
Do you have maybe any update on this? what could be a problem?
Also, i have another problem when i want to create a user and add them to specific group (I have created a loop for that and its working properly but when i want to add them to groups there is and error 400). Is there any way to add users to distribution or security groups?
This screenshot is from this microsoft graph api documentation:
The Graph API has an Add Members endpoint and it doesn’t specifically mention distribution lists so you can try hitting it with the list id and the user id and see what happens
POST https://graph.microsoft.com/v1.0/groups/{group-id}/members/$ref