Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"MailboxNotHostedInExchangeOnline" when trying to get user photos from MS Graph

Using

`https://graph.microsoft.com/beta/users/${email}/photo/$value`

had been working for me last week but now it throws a 400 error Error Output

"Mailbox is hosted by an on-premise or non-Exchange server, which is not supported."

As far as I know nothing has changed from our end. Using the v1.0 doesn't seem to make any difference. I think the user photos are stored on an on-premise exchange but are then synced up at AAD. This has been working fine for at least a year like this.

Anybody know if anything has changed in the last few days? Any documented solutions to this?

like image 275
David Harper Avatar asked Apr 27 '20 11:04

David Harper


People also ask

How do I set permissions on Microsoft chart?

Choose Add a permission, and under Microsoft APIs, select Microsoft Graph, and then select Delegated permissions. Add the following permissions: User. Read - allows your application to sign-in your user.

How do you change permissions in graph explorer?

You can consent to permissions in Graph Explorer by choosing either the Modify permissions tab or the Select permissions option in the settings gear next to your profile when you're signed in. The Modify permissions tab lists all the permissions that you need to run the query in the address bar.

What are Microsoft Graph permissions?

The Microsoft Graph has two categories of permissions: application permissions and delegated permissions. Application permissions allow an app to act as any user, while delegated permission allows only signed-in users of the application. All permissions requested by Decisions are delegated permissions.


1 Answers

Exchange Online team was trying to clean up some error codes and such they changed MailboxNotEnabledForRestAPI with HttpStatus code 404 to MailboxNotHostedInExchangeOnline with HttpStauts code 400. This was un-intended and such we have since reverted this change, and are rolling out the fixes to prod with urgency.

like image 80
Yogesh Avatar answered Oct 12 '22 22:10

Yogesh