8

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?

  • 1
    We've started having users get this error when logging in to an application via OAuth 2.0 to Azure AD, it used to work fine at the start of April. I opened a ticket with Microsoft but it got routed to an Exchange support agent, in the meantime I migrated the affected users to Exchange Online and it stared working for them. – TRS-80 Apr 29 '20 at 07:09
  • 1
    @TRS-80 could you tell how did you migrate the users to Exchange Online? I'm having the same issue. Some of the users have this problem and some not – takeit Apr 29 '20 at 13:34
  • @takeit Just using the normal Exchange Hybrid migration process. – TRS-80 May 01 '20 at 07:29
  • It's started happening to my user, time to open a case with Microsoft again and hope I get routed to the Azure support queue and not Exchange this time. – TRS-80 May 05 '20 at 06:18

1 Answers1

4

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.

Yogesh
  • 2,198
  • 1
  • 19
  • 28