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
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"
}
}
}
It works fine if I switch back to the beta endpoint, it's only an issue on v1.0.