Invitations API 返回 401 访问令牌验证失败。无效的受众

问题描述 投票:0回答:1

我有一个MSDN订阅链接到我的个人账户。我试图写一个Web应用程序,可以邀请用户使用邀请API的用户。https:/graph.microsoft.comv1.0invitations.

我试图使用客户端凭证流获取一个令牌,然后调用上述API,但得到一个无效的观众错误。我检查了token,aud claim被设置为000002-0000-0000-0000-c000-000000000000,我认为这是Graph API。我将范围设置为 https:/graph.microsoft.com.default。 在获得令牌的同时

有谁能帮帮我,我到底做错了什么,或者说这个方案不支持。

azure-active-directory azure-ad-graph-api
1个回答
0
投票

由于你正在尝试与你的个人帐户,这是不支持在这一刻,你可以看到下面的截图。

enter image description here

你可以看看 此处为正式文件

我试过下面的方法,对我很有效。

Request:

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

Response:

enter image description here

确保你的token有如下权限

enter image description here

你可以在这里查看你的权限 https:/jwt.io

希望能帮到你。

© www.soinside.com 2019 - 2024. All rights reserved.