Feb 19 2020 01:20 AM
Hi Guys!
I have developed a solution that lists groups and teams with their basic information and photo.
This has worked for years in different forms against the graph api endpoint:
https://graph.microsoft.com/v1.0/groups/{id}/photo/$value
However: Before I have been able to fetch the photo for all groups and teams regardless of membership in the team.
But then, One week ago I started to notice that all the teams that was defined as private and I was not a member of resulted in a 404 error:
{
"error": {
"code": "ErrorItemNotFound",
"message": "The photo wasn't found.",
"innerError": {
"request-id": "e36d0132-aa37-4f7f-a110-03bc4e6b71d0",
"date": "2020-02-19T09:15:28"
}
}
}
The behaviour is reproduced in several tenants and the permission level for API is Groups.ReadWrite.All
I have tried to find any information about this change, have Microsoft done changes for this API endpoint? And if so, why?
If someone has any similar experiences and/or some information that I have missed out on you are more than welcome to help me out :)
Thank you, Johan
Feb 19 2020 11:32 PM
@JBergqvist We could not repro the issue on our side. I tried getting the photo using the api you tried and it works fine for me. Could you please confirm if the group, you are trying actually has a photo?
Feb 19 2020 11:48 PM
Feb 20 2020 01:12 AM
@JBergqvist You can fetch the photo of the team only if you are a member of that team because it is based on Delegated permissions. Did you try this in Graph Explorer earlier?
Feb 20 2020 02:08 AM
Feb 11 2021 04:53 PM
Even after granting the permissions Groups.Read.All & TeamsSettings.Read.All and tried both Delegated & App permissions but still same error "Photo Wasn't Found" .