使用PHP和微软图形API,我通过查询获取用户的所有用户数据:获取使用Microsoft图形API
https://graph.windows.net/<tenant>/users/<userId>?api-version=2013-11-08
这工作得很好,但只返回用户对象的标准字段。根据该文件,我应该能够使用$选择= *获取所有用户数据,像这样:
https://graph.windows.net/<tenant>/users/<userId>?$select=*&api-version=2013-11-08
但是这给了我以下错误:
{"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"The ability to use the $select query option to define a projection in a data service query is disabled. To enable this functionality, set the DataServiceConfiguration. AcceptProjectionRequests property to true."}}}
如何启用“AcceptProjectionRequests”?在文档或其他SO线程中我没有发现这一点。
Graph API支持以下Odata查询参数:'$ filter,$ batch,$ expand,$ orderby,$ top,$ skiptoken和previous-page'。请参阅[这里](https://msdn.microsoft.com/en-us/library/azure/ad/graph/howto/azure-ad-graph-api-operations-overview#OdataQueryParameters) –