Forum Discussion
invitedToGroups and invitedToApplications in Invitation API
Hi,
This is not a question.
I am writing this after being in contact with the product group, so that others can find this later without bothering them again 🙂
The invitedToGroups and invitedToApplications columns from CSV are not directly implemented in the invitations API, because equivalents already exists in the graph API under other endpoints.
For example to add a user to a group:
https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/group_post_members
And to add a appRoleAssignment to a user:
https://graph.microsoft.io/en-us/docs/api-reference/beta/resources/approleassignment
Hope this saves someone some time 🙂
- Sarat SubramaniamMicrosoftThanks Marius! This will be very useful for those who want to invite a user and add them to a group or an app in the same script.
- Deleted
Great find!
So how are you detecting that the user has accepted the invitation? As you can't add them to a group or application until they do.
I believe this is because they're not actually created in AzureAD until they complete the invitation process.
Thanks
Craig
- Sarat SubramaniamMicrosoftWhen you invite using the Azure AD B2B API - the user is added right away and updated when the redemption happens.
So you can go ahead and add them to groups as soon as you invite them using our API.- Chad CarltonCopper Contributor
Hi, I'm still actually interested in the answer to Craig's question.
"how are you detecting that the user has accepted the invitation?"
I have need to know whether a guest user has redeemed an invitation or not.
If they have redeemed, further communications should not talk about invitations, etc). If they have not yet redeemed, I should be sending a "did you miss our invite? here's another..".
With further thought, I think this data should be interesting in both the Graph API, and the Azure Portal..
- JoelRollinsBrass Contributor