Call Api Microsoft Graph
In brief
The Agent ID Microsoft Graph documentation now labels sample variables as `usersAppOnly` and `usersOnBehalfOfUser`, clarifying the scenarios they represent.
What Entra admins need to know
Administrators and developers can more easily distinguish app-only and on-behalf-of-user examples when using the documentation.
This editorial summary was generated by AI from the documentation changes. Verify important details in the full Microsoft Learn article.
Documentation change
The comparison below shows only the changed extract. Use the full-page view for complete context.
// Call Microsoft Graph APIs with the agent identity for app only scenario
var usersusersAppOnly = await graphServiceClient.Users
.GetAsync(r => r.Options.WithAuthenticationOptions(options =>
{
options.WithAgentIdentity(agentIdentity);
}));
// Call Microsoft Graph APIs with the agent identity for on-behalf of user scenario
var usersForUserusersOnBehalfOfUser = await graphServiceClient.Users
.GetAsync(r => r.Options.WithAuthenticationOptions(options =>
{
options.WithAgentIdentity(agentIdentity);
@@ -92,7 +92,7 @@ This article explains how to call a Microsoft Graph API from an agent using agen string agentIdentity = "agent-identity-guid"; // Call Microsoft Graph APIs with the agent identity for app only scenario- var users = await graphServiceClient.Users+ var usersAppOnly = await graphServiceClient.Users .GetAsync(r => r.Options.WithAuthenticationOptions(options => { options.WithAgentIdentity(agentIdentity);@@ -100,7 +100,7 @@ This article explains how to call a Microsoft Graph API from an agent using agen })); // Call Microsoft Graph APIs with the agent identity for on-behalf of user scenario- var usersForUser = await graphServiceClient.Users+ var usersOnBehalfOfUser = await graphServiceClient.Users .GetAsync(r => r.Options.WithAuthenticationOptions(options => { options.WithAgentIdentity(agentIdentity); 