0
votes

I have an MSDN subscription linked to my Personal account. I am trying to write and Web Application which can invite users users using the Invitation API, https://graph.microsoft.com/v1.0/invitations.

I tried to get an token using the Client Credentials flow and then call the above API but getting an invalid audience error. I checked the token and the aud claim is set to 00000002-0000-0000-c000-000000000000 which i think is Graph API. I set the Scope as https://graph.microsoft.com/.default while getting the token

Can some one help me what is that i am doing wrongly or is this scenario not supported

1

1 Answers

0
votes

Since you are trying with your personal account which is not supported at this moment as you could see on screenshot below:

enter image description here

You could have a look on official document here

I have tried below way and worked for me:

Request:

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

Response:

enter image description here

Make sure your token has required permission like below:

enter image description here

You could check your permission here https://jwt.io/

Hope that would help.