2
votes

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?

2

2 Answers

3
votes

This is a doc error and we will fix it. The equivalent request (see below) is supported today in Microsoft Graph.

GET https://graph.microsoft.com/beta/users('{user_id}')/photos('{size}')/$value
2
votes

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();