Hot to use GraphServiceClient to access specific user resource not me?

Viewed 315

I am writing service application which sends mails from shared mailboxes. MS documentation specifies how to get user but it gives only HTTP request sample. For signed-in user it specifies C# sample

GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var user = await graphClient.Me.Request().GetAsync();

I would like to use GraphServiceClient to access specific user

GET https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}
1 Answers

You can use GraphExplorer. It is a very useful tool. If you are logged in with your account, you can see the result.

Insert your URL and switch to Code snippets tab.

enter image description here

Related