TransWikia.com

Is there any setting in Azure AD i need to setup for redirecting after invitation?

Stack Overflow Asked by Paul van Oudheusden on December 7, 2021

I’m inviting ‘guests’ trough the Microsoft Graph API like described in https://docs.microsoft.com/en-us/graph/api/invitation-post?view=graph-rest-1.0&tabs=http

The invitation works and even getting back the response with the inviteRedirectUrl I send with the request.
But after redemption of the invitation it’s not redirecting the user to the url I send in the request. In fact its redirecting to the base-URL from where i send the request.

So i was wandering if missed some setting or something else in Azure AD

Hope anybody can help

EDIT:
When I set sendInvitationMessage to true and let Microsoft Graph do the mailing the redirect works correctly.

2 Answers

It seems the variable where I stored the value for inviteRedirectUrl did not get filled correctly. Hury Shen thanks for thinking with me, it gave some more insight

Answered by Paul van Oudheusden on December 7, 2021

According to some test, it works fine in my side. When I test it with send an email, it works fine. And if I test it without sending an email, if I copy the inviteRedeemUrl to my browser, it also works fine.

But when I test it in graph explorer, I follow the link by ctrl + click, it will show error which I guess same to your error message.

enter image description here

It seems when ctrl + click in graph explorer, it will decode the inviteRedeemUrl first and then go to the link. When it do decode on the %26 after the tenant id in inviteRedeemUrl. It will not recognize the parameters after the %26(&) as the parameters of the redirect url. So please copy the link to browser, but not just use ctrl + click.(By the way, I also test it in postman. In postman, use ctrl + click is ok. It fails only in graph explorer when use ctrl + click).

Answered by Hury Shen on December 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP