【发布时间】:2018-08-23 10:30:38
【问题描述】:
我需要在我的 B2B Azure AD 上对用户执行多项操作。
我可以通过这个端点成功创建/读取/更新/删除用户:https://graph.windows.net/mytenant.onmicrosoft.com/users?api-version=1.6
但我不知道如何找到合适的端点来邀请我的租户中的来宾用户。 documentation 说 https://graph.microsoft.com/v1.0/invitations 但使用这个端点,我总是这个错误:
{
"error":{
"code":"InvalidAuthenticationToken",
"message":"Access token validation failure.",
"innerError":{
"request-id":"cb182623-39c1-4489-b649-d209d9c8d7fa",
"date":"2018-08-23T09:53:32"
}
}
}
如果我尝试构建一个看起来像我的用户 https://graph.windows.net/mytenant.onmicrosoft.com/invitations?api-version=1.6 的端点,我会得到这个:
{
"odata.error":{
"code":"Request_ResourceNotFound",
"message":{
"lang":"en",
"value":"Resource not found for the segment 'invitations'."
}
}
}
如果我尝试使用邀请文档为用户提供的端点https://graph.microsoft.com/v1.0/users,我会收到相同的错误:
{
"error":{
"code":"InvalidAuthenticationToken",
"message":"Access token validation failure.",
"innerError":{
"request-id":"80d0c785-7769-4d8c-a6a6-82fb67f30ffa",
"date":"2018-08-23T09:51:37"
}
}
}
所以我猜这不是令牌问题,而是端点问题。如果有人能给我一个很好的方法来执行这个邀请,将不胜感激。
【问题讨论】:
标签: azure azure-active-directory azure-ad-graph-api