Reputation: 453
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?
Upvotes: 4
Views: 1674
Reputation: 414
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()
Upvotes: 7
Reputation: 2883
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
Upvotes: 5