What happened to the group/teams photo endpoint in graph api? Not fetching photos

%3CLINGO-SUB%20id%3D%22lingo-sub-1181508%22%20slang%3D%22en-US%22%3EWhat%20happened%20to%20the%20group%2Fteams%20photo%20endpoint%20in%20graph%20api%3F%20Not%20fetching%20photos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1181508%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Guys!%3CBR%20%2F%3EI%20have%20developed%20a%20solution%20that%20lists%20groups%20and%20teams%20with%20their%20basic%20information%20and%20photo.%3CBR%20%2F%3EThis%20has%20worked%20for%20years%20in%20different%20forms%20against%20the%20graph%20api%20endpoint%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%7Bid%7D%2Fphoto%2F%24value%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EHowever%3A%20Before%20I%20have%20been%20able%20to%20fetch%20the%20photo%20for%20all%20groups%20and%20teams%20regardless%20of%20membership%20in%20the%20team.%3CBR%20%2F%3EBut%20then%2C%20One%20week%20ago%20I%20started%20to%20notice%20that%20all%20the%20teams%20that%20was%20defined%20as%20private%20and%20I%20was%20not%20a%20member%20of%20resulted%20in%20a%20404%20error%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%7B%0A%20%20%22error%22%3A%20%7B%0A%20%20%20%20%22code%22%3A%20%22ErrorItemNotFound%22%2C%0A%20%20%20%20%22message%22%3A%20%22The%20photo%20wasn't%20found.%22%2C%0A%20%20%20%20%22innerError%22%3A%20%7B%0A%20%20%20%20%20%20%22request-id%22%3A%20%22e36d0132-aa37-4f7f-a110-03bc4e6b71d0%22%2C%0A%20%20%20%20%20%20%22date%22%3A%20%222020-02-19T09%3A15%3A28%22%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EThe%20behaviour%20is%20reproduced%20in%20several%20tenants%20and%20the%20permission%20level%20for%20API%20is%20%3CU%3EGroups.ReadWrite.All%3C%2FU%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20tried%20to%20find%20any%20information%20about%20this%20change%2C%20have%20Microsoft%20done%20changes%20for%20this%20API%20endpoint%3F%20And%20if%20so%2C%20why%3F%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20someone%20has%20any%20similar%20experiences%20and%2For%20some%20information%20that%20I%20have%20missed%20out%20on%20you%20are%20more%20than%20welcome%20to%20help%20me%20out%20%3A)%3C%2Fimg%3E%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%2C%20Johan%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1181508%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGraph%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ephoto%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESPFx%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1183913%22%20slang%3D%22en-US%22%3ERe%3A%20What%20happened%20to%20the%20group%2Fteams%20photo%20endpoint%20in%20graph%20api%3F%20Not%20fetching%20photos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1183913%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F546985%22%20target%3D%22_blank%22%3E%40JBergqvist%3C%2FA%3E%26nbsp%3BWe%20could%20not%20repro%20the%20issue%20on%20our%20side.%20I%20tried%20getting%20the%20photo%20using%20the%20api%20you%20tried%20and%20it%20works%20fine%20for%20me.%20Could%20you%20please%20confirm%20if%20the%20group%2C%20you%20are%20trying%20actually%20has%20a%20photo%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1183923%22%20slang%3D%22en-US%22%3ERe%3A%20What%20happened%20to%20the%20group%2Fteams%20photo%20endpoint%20in%20graph%20api%3F%20Not%20fetching%20photos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1183923%22%20slang%3D%22en-US%22%3EHi%20Gousia!%20Thank%20you%20for%20your%20reply.%3CBR%20%2F%3EYes%20the%20team%20has%20a%20photo.%3CBR%20%2F%3EThe%20code%20works%20when%20you%20are%20a%20member%20of%20the%20team%20but%20not%20otherwise.%3CBR%20%2F%3ESo%20its%20obviously%20a%20permission%20issue.%20But%20this%20is%20not%20how%20things%20have%20worked%20before.%3CBR%20%2F%3E%3CBR%20%2F%3ECan%20you%20confirm%2C%20are%20you%20able%20to%20load%20photos%20for%20teams%20that%20you%20are%20not%20a%20member%20of%3F%3CBR%20%2F%3E%3CBR%20%2F%3EKind%20regards%2C%20johan%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1184026%22%20slang%3D%22en-US%22%3ERe%3A%20What%20happened%20to%20the%20group%2Fteams%20photo%20endpoint%20in%20graph%20api%3F%20Not%20fetching%20photos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1184026%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F546985%22%20target%3D%22_blank%22%3E%40JBergqvist%3C%2FA%3E%26nbsp%3BYou%20can%20fetch%20the%20photo%20of%20the%20team%20only%20if%20you%20are%20a%20member%20of%20that%20team%20because%20it%20is%20based%20on%20Delegated%20permissions.%20Did%20you%20try%20this%20in%20Graph%20Explorer%20earlier%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1184099%22%20slang%3D%22en-US%22%3ERe%3A%20What%20happened%20to%20the%20group%2Fteams%20photo%20endpoint%20in%20graph%20api%3F%20Not%20fetching%20photos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1184099%22%20slang%3D%22en-US%22%3EYes%20this%20has%20worked%20before.%20With%20delegated%20permission%2C%20just%20as%20much%20fetching%20the%20title%20of%20a%20team.%20I'm%20pretty%20sure%20of%20it.%3CBR%20%2F%3EI%20noticed%20this%20a%20few%20weeks%20ago%2C%20before%20this%20everything%20worked%20as%20expected.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20dont%20understand%20why%20the%20picture%20for%20a%20group%20or%20team%20should%20be%20seen%20as%20sensitive%20and%20hence%20be%20locked%20out%20of%20results.%20Group.Read.All%20Shoud%20be%20sufficient%20for%20the%20picture.%20Or%20give%20me%20a%20standard%20%2F%20default%20picture%20just%20as%20when%20no%20image%20is%20added%20to%20a%20team.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20gone%20through%20if%20some%20more%20permission%20has%20been%20added%20before%20but%20cant%20find%20any%20reason%20for%20why%20it%20has%20worked%20before.%3CBR%20%2F%3EThanks%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

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


4 Replies
Highlighted

@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?

Highlighted
Hi Gousia! Thank you for your reply.
Yes the team has a photo.
The code works when you are a member of the team but not otherwise.
So its obviously a permission issue. But this is not how things have worked before.

Can you confirm, are you able to load photos for teams that you are not a member of?

Kind regards, johan

Highlighted

@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?

Highlighted
Yes this has worked before. With delegated permission, just as much fetching the title of a team. I'm pretty sure of it.
I noticed this a few weeks ago, before this everything worked as expected.

I dont understand why the picture for a group or team should be seen as sensitive and hence be locked out of results. Group.Read.All Shoud be sufficient for the picture. Or give me a standard / default picture just as when no image is added to a team.

I have gone through if some more permission has been added before but cant find any reason for why it has worked before.
Thanks