如何使用MS Graph API列出Office 365 Germany域中的用户?

时间:2018-06-11 16:10:26

标签: rest azure office365 microsoft-graph

我正在尝试列出Office 365德国域中的用户。我正在使用MS Graph API。 我在Azure AD中注册了具有所有应用程序权限的应用程序。 我可以获得访问令牌,但是当我尝试发送下一个请求以列出组织中的用户时

GET https://graph.cloudapi.de/v1.0/users

我收到错误回复:

{  
   "odata.error":{  
      "code":"Request_DataContractVersionMissing",
      "message":{  
         "lang":"en",
         "value":"The specified api-version is invalid. The value must exactly match a supported version."
      }
   }
}

当我使用此请求在Microsoft Graph全局服务上执行相同操作时

GET https://graph.microsoft.com/v1.0/users

一切正常,我可以获得响应的用户列表。 我错过了什么或做错了什么?如何使用MS Graph API获取Office 365 Germany域中的用户列表?

1 个答案:

答案 0 :(得分:3)