2016-10-12 25 views
1

使用以下URL: https://graph.microsoft.com/dd0d2506-56b4-463c-bd19-98cd81bdfb1c/users/821d91b8-36e1-4b89-bd3a-4caecc40e4c9/ $鏈接/ API的memberOf版本= 1.6Azure的圖形API B2C - 無效的版本

我試圖調用圖形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
  • /用戶?API版本=測試
  • /users?api-version=1.6

天藍色的門戶處於「預覽」狀態。任何人看到這個?

+0

既然你不提供什麼要求你實際製作,你見過這個:https://msdn.microsoft.com/library/azure/ad/graph/api/users-operations#GetUsers – 4c74356b41

回答

5

您使用的API版本模式適用於Azure AD Graph API(https://graph.windows.net),但您使用的端點適用於Microsoft Graph API(https://graph.microsoft.com)。

如果你想使用Azure的AD圖形API,你應該使用:

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

如果你想使用微軟的圖形API,你可以使用:

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