Check the return status of a catalog invitation using Microsoft Graph

I invite a user to be added as a member to my Active Directory using the Microsoft Graph REST API.

curl -X POST \
  https://graph.microsoft.com/v1.0/invitations \
  -H 'authorization: Bearer ey...Jg' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{
  "invitedUserEmailAddress": "userInvite@hotmail.com",
  "inviteRedirectUrl": "https://example.com/afterInvite",
  "sendInvitationMessage": false,
  "invitedUserType":"Member"
}'

      

I am getting the correct answer with the status:

"status": "PendingAcceptance",

which is of course true since the user has just been invited. Is there a way to find out if the user has completed the invitation yet?

Thank you so much

+3


source to share


2 answers


Microsoft Graph does not support checking status for invited users. However, we can use the Azure AD API to check this status.

To get this status, we can get the Update User event and check the UserState to achieve the goal.



For more information about Reporting API Azure AD can you link .

Note . Activity does not appear in the audit log. It can take anywhere from 30 minutes to an hour to view the audit logs in the Azure portal from the time the operation was performed.

Wait 30 minutes to an hour and see if the activity displays in the activity log.

+3


source


In the "Identity" section of the Azure Portal user profile, there is a property called "Source" and it changed to Microsoft account or something like that "Invited User" when the user purchased the invitation. But this source property is not in the User property returned from the API.



Find a request to implement a way to do this in the Charting API here and vote for it.

0


source







All Articles