ITeamsTurnContext.GetAppGraphClientForConnection(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a Microsoft.Graph.GraphServiceClient authenticated with an app-only (application) token, using the named token connection.
public Microsoft.Graph.GraphServiceClient GetAppGraphClientForConnection(string connectionName, string graphBaseUrl = "https://graph.microsoft.com/v1.0");
abstract member GetAppGraphClientForConnection : string * string -> Microsoft.Graph.GraphServiceClient
Public Function GetAppGraphClientForConnection (connectionName As String, Optional graphBaseUrl As String = "https://graph.microsoft.com/v1.0") As GraphServiceClient
Parameters
- connectionName
- String
The name of the token connection whose credentials acquire the app-only token. Cannot be null or empty.
- 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 an app-only token.
Remarks
The returned client uses application permissions, so the caller must specify the target resource in the request path (for example client.Users["{userId}"]...).