Language

ITeamsTurnContext.GetGraphClient(String, String) Method

Definition

Creates a Microsoft.Graph.GraphServiceClient authenticated with a delegated (user) token for the signed-in user of the current turn.

public Microsoft.Graph.GraphServiceClient GetGraphClient(string handlerName = default, string graphBaseUrl = "https://graph.microsoft.com/v1.0");
abstract member GetGraphClient : string * string -> Microsoft.Graph.GraphServiceClient
Public Function GetGraphClient (Optional handlerName As String = Nothing, Optional graphBaseUrl As String = "https://graph.microsoft.com/v1.0") As GraphServiceClient

Parameters

handlerName
String

The name of the sign-in handler to use for token acquisition. If null, the default handler is used.

graphBaseUrl
String

The base URL for the Microsoft Graph API. Defaults to "https://graph.microsoft.com/v1.0".

Returns

A Microsoft.Graph.GraphServiceClient authenticated with a delegated user token.

Remarks

Requires that user authorization is configured for the agent and the user is signed in. The returned client makes requests to Microsoft Graph on behalf of the user.

Applies to