試圖使用毫秒圖api,並在包括v1.0/me/messages
的選定端點上繼續收到此錯誤。ErrorAccessDenied on https://graph.microsoft.com/v1.0/me/messages
看起來像權限一個簡單的問題(不清楚爲什麼用戶不會有權限來訪問自己的電子郵件?),但什麼是困惑我的是,當我用同樣Office365憑據簽署並訪問同樣的端點developer.microsoft.com/en-us/graph/graph-explorer
它工作正常。
不是一個認證令牌問題,因爲完全相同的請求v1.0/me
端點工作正常。
調試使用curl從服務器:
curl -H "Authorization: Bearer eyJ0e.....dRcgg"
https://graph.microsoft.com/v1.0/me
我得到一個好的結果,同樣的請求在/v1.0/me/messages
終點結果:
{
"error": {
"code": "ErrorAccessDenied",
"message": "Access is denied. Check credentials and try again.",
"innerError": {
"request-id": "019d61ff-77fd-4e9f-a94e-38faf741ac33",
"date": "2017-04-02T00:04:16"
}
}
}
要重複,這是扔我的問題是,我我能夠用相同的憑據從developer.microsoft.com/en-us/graph/graph-explorer