Adding Guest user to Group using Graph API

serge calderara (Solatys) 116 Reputation points

Dear all,

When I use graph API withinh POSTMAN in order to add a guest user to a group I process as follow :

  1. Add the /invitations endpoint to add my user ( I do not use email invitation)
  2. Then I can see from my AD users that it has been added properly
  3. Next I user the /groups/{Group ID}/members/$ref to add the created users in step 1
  4. Then I can see from my AD that users has been added to group right a way

Then this exact steps, I add it in a script that is executed at a dedicated time as follow:

  1. use the /invitations endpoint to add my user and Send an invitation by email
  2. The return userID by first call is then used to add right away the user to the group by using the /groups/{Group ID}/members/$ref endpoint with body set as

"": "{userID}"

Then response to add user to group is successfull

Then what is strange is that when I check in my AD , I can see the user which has been created BUT I do not see that user as a member of the group it has been added.
It is not displayed while no error was return during the API call

Does it means it takes some time to get it visible ?
Does it means that user need to validate the invitation before it is added to the group ?

Thanks for clarification


Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,513 questions
{count} votes

1 answer

Sort by: Most helpful
  1. serge calderara (Solatys) 116 Reputation points

    I manage to identify the issue.
    It was my mistake in my script

    PS : This forum is a nightmare to post, it failed most of the time, do not respond frequently.

    0 comments No comments