Graph API Group Get Photo 403

%3CLINGO-SUB%20id%3D%22lingo-sub-320250%22%20slang%3D%22en-US%22%3EGraph%20API%20Group%20Get%20Photo%20403%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320250%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20experts%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20Flow%20that%20uses%20the%20Graph%20API%20v1.0%20endpoint%20in%20order%20to%20fetch%20the%20binary%20of%20an%20Office%20365%20group%20photo.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere%20is%20the%20call%3A%3C%2FP%3E%3CP%3E%3CU%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%257bGroupId%257d%2Fphoto%2F%24value%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%7BGroupId%7D%2Fphoto%2F%24value%3C%2FA%3E%3C%2FU%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20it%20always%20returns%20a%20403%20forbidden%3B%3C%2FP%3E%3CP%3E%7B%3C%2FP%3E%3CP%3E%22error%22%3A%20%7B%3C%2FP%3E%3CP%3E%22code%22%3A%20%22ErrorAccessDenied%22%2C%3C%2FP%3E%3CP%3E%22message%22%3A%20%22Access%20is%20denied.%20Check%20credentials%20and%20try%20again.%22%2C%3C%2FP%3E%3CP%3E%22innerError%22%3A%20%7B%3C%2FP%3E%3CP%3E%22request-id%22%3A%20%229f5b88b0-4625-42bc-b5de-fecdd2d59756%22%2C%3C%2FP%3E%3CP%3E%22date%22%3A%20%222019-01-17T16%3A37%3A01%22%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThough%20I%20think%20permissions%20on%20my%20AppRegistration%20are%20ok%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68921i0E7F27592E83D12C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222019-01-17%2017_41_12-App%20registrations%20-%20Microsoft%20Azure.png%22%20title%3D%222019-01-17%2017_41_12-App%20registrations%20-%20Microsoft%20Azure.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EIf%20I%20compare%20with%20required%20perms%20in%20the%20doc%3A%3C%2FP%3E%3CP%3E%3CU%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fprofilephoto-get%3Fview%3Dgraph-rest-1.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fprofilephoto-get%3Fview%3Dgraph-rest-1.0%26nbsp%3B%3C%2FA%3E%3C%2FU%3E%3C%2FP%3E%3CP%3E%3CU%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20949px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68922i0FA58F9B160E4EF1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222019-01-17%2017_43_33-Get%20photo%20-%20Microsoft%20Graph%20v1.0%20_%20Microsoft%20Docs.png%22%20title%3D%222019-01-17%2017_43_33-Get%20photo%20-%20Microsoft%20Graph%20v1.0%20_%20Microsoft%20Docs.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FU%3E%3C%2FP%3E%3CP%3EAny%20idea%20on%20what%20could%20possibly%20go%20wrong%20here%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20feedback%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-320250%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-320252%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20API%20Group%20Get%20Photo%20403%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-320252%22%20slang%3D%22en-US%22%3E%3CP%3ESmall%20precision...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20call%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%257bGroupId%257d%2Fphoto%2F%24value%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fgroups%2F%7BGroupId%7D%2Fphoto%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20works%20flawlessly%20so%20the%20authentication%20%2F%20permissions%20part%20should%20be%20OK.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-826417%22%20slang%3D%22en-US%22%3ERe%3A%20Graph%20API%20Group%20Get%20Photo%20403%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-826417%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F92623%22%20target%3D%22_blank%22%3E%40Benoit%20DELVAUX%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20app%20only%20permission%20is%20no%20longer%20valid%20for%20photo%2C%20you%20need%20delegated%20permission%20in%20order%20to%20get%20the%20photo%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fknown-issues%23groups%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fknown-issues%23groups%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello experts,

 

I have a Flow that uses the Graph API v1.0 endpoint in order to fetch the binary of an Office 365 group photo.

 

Here is the call:

https://graph.microsoft.com/v1.0/groups/{GroupId}/photo/$value

 

But it always returns a 403 forbidden;

{

"error": {

"code": "ErrorAccessDenied",

"message": "Access is denied. Check credentials and try again.",

"innerError": {

"request-id": "9f5b88b0-4625-42bc-b5de-fecdd2d59756",

"date": "2019-01-17T16:37:01"

}

}

}

 

Though I think permissions on my AppRegistration are ok:

2019-01-17 17_41_12-App registrations - Microsoft Azure.png

If I compare with required perms in the doc:

https://docs.microsoft.com/en-us/graph/api/profilephoto-get?view=graph-rest-1.0 

2019-01-17 17_43_33-Get photo - Microsoft Graph v1.0 _ Microsoft Docs.png

Any idea on what could possibly go wrong here?

 

Thanks for your feedback,

2 Replies

Small precision...

 

If I call:

https://graph.microsoft.com/v1.0/groups/{GroupId}/photo

 

It works flawlessly so the authentication / permissions part should be OK.

 

Best,

@Benoit DELVAUX 

The app only permission is no longer valid for photo, you need delegated permission in order to get the photo:

https://docs.microsoft.com/en-us/graph/known-issues#groups