使用以下网址: https://graph.microsoft.com/dd0d2506-56b4-463c-bd19-98cd81bdfb1c/users/821d91b8-36e1-4b89-bd3a-4caecc40e4c9/ $链接/的memberOf?API-版本= 1.6
我正在尝试调用图API,但我收到以下错误。
{
"error": {
"code": "BadRequest",
"message": "Invalid version",
"innerError": {
"request-id": "cb8002f1-da39-4ad2-8695-a2d349efc303",
"date": "2016-10-12T10:46:23"
}
}
}
我试过这些版本
天蓝色门户网站正在"预览"。有谁见过这个?
答案 0 :(得分:9)
您使用的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