Hi, I have some problematic users in my Azure AD tenant where the photos cannot be found if I use a URL like this:
GET https://graph.microsoft.com/v1.0/users/problem.user@contoso.com/photos
Returns
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('problem.user%40contoso.com')/photos",,
"value": []
}
Surprisingly, it does work when I replace v1.0
with beta
in my original request.
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('problem.user%40contoso.com')/photos",,
"value": [
{
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "W/\"40fa783936f0fa14b9531bf86702568a0c99cba130fe6d11dc541cbbb0c8cbea\"",
"id": "48x48",
"height": 48,
"width": 48
},
{
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "W/\"40fa783936f0fa14b9531bf86702568a0c99cba130fe6d11dc541cbbb0c8cbea\"",
"id": "64x64",
"height": 64,
"width": 64
},
{
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "W/\"40fa783936f0fa14b9531bf86702568a0c99cba130fe6d11dc541cbbb0c8cbea\"",
"id": "96x96",
"height": 96,
"width": 96
},
{
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "W/\"40fa783936f0fa14b9531bf86702568a0c99cba130fe6d11dc541cbbb0c8cbea\"",
"id": "120x120",
"height": 120,
"width": 120
},
{
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "W/\"40fa783936f0fa14b9531bf86702568a0c99cba130fe6d11dc541cbbb0c8cbea\"",
"id": "240x240",
"height": 240,
"width": 240
},
{
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "W/\"40fa783936f0fa14b9531bf86702568a0c99cba130fe6d11dc541cbbb0c8cbea\"",
"id": "360x360",
"height": 360,
"width": 360
},
{
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "W/\"40fa783936f0fa14b9531bf86702568a0c99cba130fe6d11dc541cbbb0c8cbea\"",
"id": "432x432",
"height": 432,
"width": 432
},
{
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "W/\"40fa783936f0fa14b9531bf86702568a0c99cba130fe6d11dc541cbbb0c8cbea\"",
"id": "504x504",
"height": 504,
"width": 504
},
{
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "W/\"40fa783936f0fa14b9531bf86702568a0c99cba130fe6d11dc541cbbb0c8cbea\"",
"id": "648x648",
"height": 648,
"width": 648
}
]
}
I found this related issue on Stack Overflow but no real solution. I'd rather not use the beta version if at all possible.
https://stackoverflow.com/questions/56851425/not-able-to-get-photo-using-microsoft-graph-api
Thanks