0
votes

I'd like to use Microsoft Graph API to obtain any person's photo (that is associated to their Microsoft Personal account) based on their email address.

The documentation on MSDN only seems to refer to Microsoft Organizational Accounts. I was able to obtain photos for an Organizational Account, but not for Personal Accounts. How do I do this?

1

1 Answers

1
votes

It's possible to fetch the photo of the signed in personal account, albeit with some limitations.

The request to get the photo is the same as for org accounts (however, this functionality is only available in /beta): GET https://graph.microsoft.com/beta/me/photo/$value

Two caveats to note:

  1. It appears if the photo isn't set, you will get a 501 error. This is a beta API so I expect this may change to a 404.
  2. The functionality to fetch photo metadata (dimensions, format) is not currently supported for personal accounts