Office365Users.UserPhotoV2 failed: { "error": { "code": "ForbiddenByPolicy","message": "invalid_role

Copper Contributor

We have a PowerApp that is running to show the Photo of multiple users in our tenant. When you click on a user we set an image control's image source to Office365Users.UserPhotoV2(SelectedUser.Email)

 

Within the last two week, there are two users that get the error stated in the subject when they view everyone else's photo, but not when they view their own.

 

I believe this must be due to some Azure policy set in our tenant but I don't have the knowledge or permissions to troubleshoot this further.

 

Any information that can be provided would be appreciated. I also posted this on the PowerApps Community Forum too. Only response so far was to come to this forum and see if anyone could help.

5 Replies

@HowseBrad 

 

So you are able to access logs either?

no access to logs. I assume you are talking about the Logs under the Monitoring section of Azure?

If I did would you think this would be the place to look for more information on what policy is stopping the access?

@HowseBrad 

 

I have the same error, did you manage to progress this issue?

Nope not yet. Issue is still occurring, but the number of users affected are very low and the impact is a minor annoyance. So not a High Priority.

@HowseBrad 

Ok, from my side, I was working on a PowerApp and initially encountered an issue while using my account, (set up as a co-owner). We added another person as a co-owner and began editing the app using their account. and the error vanish. We published the app using the new co-owner's account and the errors that were previously affecting my account completely disappeared. I'm still uncertain about the exact reasons why but maybe this could help you with the few users that are effected.