I'm looking at the Microsoft Graph API Beta for Users/Photo operations documentation and I am comparing it to the Outlook REST API. In the Outlook REST Beta there is the option of retrieving a photo by size.
GET https://outlook.office.com/api/beta/Users('{user_id}')/photos('{size}')/$value
I do not see a way in Graph API to request a photo by size. Is there anyway to do this? If not, is this a planned feature?
When using the Microsoft Graph SDK you can do it this way:
var graphClient = GetGraphServiceClient();
var photoStream = await graphClient.Users[userId].Photos["120x120"].Content.Request().GetAsync();
// or
var photoStream = await graphClient.Me.Photos["120x120"].Content.Request().GetAsync()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With