Entra ID provisioning api how to manage user group memberships?

Alistair Young 56 Reputation points
2024-11-27T14:49:41.5933333+00:00

The Entra ID provisioning API manages user information in Entra based on files uploaded. Is there a way to use it to manage group memberships for those users?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. FrankEscarosBuechsel-MSFT 900 Reputation points Microsoft Employee Moderator
    2024-11-27T18:15:30.37+00:00

    Hi @Alistair Young • Thank you for reaching out.

    It looks like you are trying to achieve automated group membership provisioning via bulk import?

    I have tested this by using dynamic group membership using one of the properties used in the SCIM schema for the bulk imported user and this approach works fine, if the groups you are using actually can have dynamic membership.

    Below you can see the bulk import via API: Screenshot 2024-11-27 174652

    And the status of the membership in the group via the department property of the imported users, no manual interaction was necessary in this case:

    Screenshot 2024-11-27 175433

    However, if you cannot utilize dynamic group memberships for any reason, for example you want to add the users to already existing of the membership type "Assigned" rather than dynamic you will have to follow a 2 step approach.

    Group membership requires an object ID which only is available after the object has been created, post uploading the users with the bulkUpload api endpoint you could use the following group API Add group members. Please note that there is a transaction limit of 20 users with a single request when using this API call, so you may need to paginate the request.

    The portal does offer a possibility to perform bulk group membership operations, but this is only available via the UI, currently neither the stable nor the beta Graph API documentation contain any steps or API endpoint for that operation, judging from the initial question this may not be exactly what you are looking for as it seems you want a fully automated workflow, but I will point to the Learn article so others may benefit of a small manual step mechanism. Read more: Bulk add group members in Microsoft Entra ID

    Since you must have some sort of mapping mechanism from user properties to intended group membership if you wanted a full manual approach you could potentially scan the service logs of the User bulk import as described in the documentation (I'll point to the PowerShell example, but other examples exist as well) here: Get provisioning logs of the latest sync cycles, this would allow you to parse out the user IDs which you then can attribute map to the intended groups to create the csv files for either a manual bulk upload operation or for further processing via the aforementioned group-post-member API.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.