我试图使用Microsoft Graph Api获取所有用户 . 我创建了一个应用程序并添加了User.Read.All和Directory.Read.All等应用程序权限 . 现在我试图从Curl命令获取访问令牌,如:

curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'client_id=XXXXXXXXXXXXXXXXXX &scope=https://graph.microsoft.com/.default&client_secret=XXXXXXXXXXXXX &grant_type=client_credentials&redirect_url=http://localhost:1337/auth/callback' 'https://login.microsoftonline.com/common/oauth2/v2.0/token'

它正在提供访问令牌 . 当我试图从邮递员调用https://graph.microsoft.com/v1.0/users并提供授权 Headers 但它给出的响应如下:

{ "error": { "code": "Authorization_IdentityNotFound", "message": "The identity of the calling application could not be established.", "innerError": { "request-id": "75c112fd-6019-4cd1-bc4b-928e276", "date": "2017-11-29T08:07:35" } } }

有人可以帮我解决这个问题吗?

谢谢