"ErrorAccessDenied";使用Microsoft Graph API v1.0获取用户照片时
当尝试使用Microsoft Graph API v1.0获取用户照片时,出现" ErrorAccessDenied ".我大约有200位用户,每10张用户照片中就有1张出现此错误(其他照片工作正常).
I'm getting an "ErrorAccessDenied" when attempting to get user photos with the Microsoft Graph API v1.0. I have approx 200 users, and I'm getting this error for around 1 in 10 user photos (the others work fine).
我可以通过以下方式获得用户个人资料信息:
I can get user profile info fine with:
https://graph.microsoft.com/v1.0/tenantID.onmicrosoft.com/users/someUserId/
但是对于某些用户,尝试获取照片:
But for some users, attempting to get a photo:
https://graph.microsoft.com/v1.0/tenantID.onmicrosoft.com/users/someUserId/photo
https://graph.microsoft.com/v1.0/tenantID.onmicrosoft.com/users/someUserId/photo/$value
返回"ErrorAccessDenied":
returns "ErrorAccessDenied":
{
"error": {
"code": "ErrorAccessDenied",
"message": "Access is denied. Check credentials and try again.",
"innerError": {
"request-id": "ea95a205-23c1-4f3c-b8d5-6ab1dcff0a2e",
"date": "2015-11-26T00:02:11"
}
}
}
如果我切换回beta端点,效果很好,这只是v1.0上的一个问题.
It works fine if I switch back to the beta endpoint, it's only an issue on v1.0.
您的请求正确.由于某些用户的构建版本不正确,因此您正在获得一些错误.造成不便之处,敬请见谅,部署应在几天内完成.请注意,此问题已在发行说明中捕获: https://graph.microsoft.io/docs/概述/release_notes
Your requests are correct. You are getting errors on some users due to those users not having the right build with a fix that is rolling out. Apologies for the inconvenience, the deployment should complete in a few days. Note, this issue was captured in the release notes: https://graph.microsoft.io/docs/overview/release_notes