Azure 图形 API B2C - 版本无效

标签 azure azure-ad-b2c

使用以下网址: https://graph.microsoft.com/dd0d2506-56b4-463c-bd19-98cd81bdfb1c/users/821d91b8-36e1-4b89-bd3a-4caecc40e4c9/ $links/memberOf?api-version=1.6

我正在尝试调用图形 API,但收到以下错误。

{
  "error": {
    "code": "BadRequest",
    "message": "Invalid version",
    "innerError": {
      "request-id": "cb8002f1-da39-4ad2-8695-a2d349efc303",
      "date": "2016-10-12T10:46:23"
    }
  }
}

我已经尝试过这些版本

  • /users?api-version=1.5
  • /users?api-version=beta
  • /users?api-version=1.6

Azure 门户处于“预览”状态。有人看过这个吗?

最佳答案

您使用的 API 版本模式适用于 Azure AD Graph API ( https://graph.windows.net ),但您使用的终结点适用于 Microsoft Graph API ( https://graph.microsoft.com )。

如果您想使用 Azure AD Graph API,您应该使用:

https://graph.windows.net/{tenant-id}/users/{id}/memberOf?api-version=1.6

如果您想使用 Microsoft Graph API,您可以使用:

https://graph.microsoft.com/v1.0/{tenant-id}/users/{id}/memberOf

关于Azure 图形 API B2C - 版本无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39996749/

相关文章:

Azure AD 应用程序注册用户角色未反射(reflect)

从 IISExpress 切换到完整 IIS 时出现 Azure "role discovery data is unavailable"错误

azure - 在Azure发布管道中是否可以一次手动触发多个发布管道?

c# - 我们可以从 Azure AD B2C 中的 "Profile editing policies"更改用户的电子邮件地址吗?

azure-ad-b2c - 重定向 URI 与回复 URL

javascript - 如何使用 Azure 移动服务 API 功能

angular - Azure Devops 管道 - 您的全局 CLI 版本高于本地版本

带有 Web API 的 Azure B2C

Azure Active Directory (B2E) 与 Azure Active Directory B2C - 现有信息不明确且难以理解

Azure B2C - 在 Azure 中为不同用户类型设置多个登录的单一应用程序