2
votes

I can create an invitation for a B2B user by a POST to

https://graph.microsoft.com/v1.0/invitations

and with body

{
  "invitedUserEmailAddress": "[email protected]",
  "inviteRedirectUrl": "https://myapp.com"
}

This redirects the user to "https://myapp.com" after they have redeemed their invitation.

Is is possible to invite someone without redirecting them after redemption? If it's not absolutely necessary, I would like to avoid the hassle of hosting a confirmation webpage just for that purpose. However, the API does not accept a null or empty or relative URL for "inviteRedirectUrl".

1

1 Answers

3
votes

No, there is not. The RedirectURL field is mandatory. You can, however, redirect to all kinds of URL's. So you could redirect to a generic page for your company, or google.com, or ...

inviteRedirectUrl (String) The URL user should be redirected to once the invitation is redeemed. Required.

More information: microsoft-graph-docs/api-reference/v1.0/api/invitation_post.md

And another one: HowTo: invite AAD user with Microsoft Graph