Graph API Group Get Photo 403

Copper 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