TeamsFx.CreateMicrosoftGraphClient Method

Definition

Overloads

CreateMicrosoftGraphClient(TokenCredential, String, ILogger<MsGraphAuthProvider>)
Obsolete.

Get Microsoft graph client.

CreateMicrosoftGraphClient(TokenCredential, String[], ILogger<MsGraphAuthProvider>)
Obsolete.

Get Microsoft graph client.

CreateMicrosoftGraphClient(TokenCredential, String, ILogger<MsGraphAuthProvider>)

Caution

This method is deprecated. Please use GraphServiceClient(TokenCredential credential, IEnumerable<string> scopes = null, string baseUrl = null) from Microsoft.Graph instead.

Get Microsoft graph client.

[System.Obsolete("This method is deprecated. Please use GraphServiceClient(TokenCredential credential, IEnumerable<string> scopes = null, string baseUrl = null) from Microsoft.Graph instead.", false)]
public Microsoft.Graph.GraphServiceClient CreateMicrosoftGraphClient (Azure.Core.TokenCredential credential, string scopes = ".default", Microsoft.Extensions.Logging.ILogger<Microsoft.TeamsFx.MsGraphAuthProvider> logger = default);
[<System.Obsolete("This method is deprecated. Please use GraphServiceClient(TokenCredential credential, IEnumerable<string> scopes = null, string baseUrl = null) from Microsoft.Graph instead.", false)>]
member this.CreateMicrosoftGraphClient : Azure.Core.TokenCredential * string * Microsoft.Extensions.Logging.ILogger<Microsoft.TeamsFx.MsGraphAuthProvider> -> Microsoft.Graph.GraphServiceClient
Public Function CreateMicrosoftGraphClient (credential As TokenCredential, Optional scopes As String = ".default", Optional logger As ILogger(Of MsGraphAuthProvider) = Nothing) As GraphServiceClient

Parameters

credential
TokenCredential

Token credential instance.

scopes
String

The string of Microsoft Token scopes of access separated by space. Default value is .default.

logger
ILogger<MsGraphAuthProvider>

Logger of MsGraphAuthProvider class. If the value is null, it will use the logger constructed by DI during TeamsFx class initialization.

Returns

Microsoft.Graph.GraphServiceClient

Graph client with specified scopes.

Attributes

Applies to

CreateMicrosoftGraphClient(TokenCredential, String[], ILogger<MsGraphAuthProvider>)

Caution

This method is deprecated. Please use GraphServiceClient(TokenCredential credential, IEnumerable<string> scopes = null, string baseUrl = null) from Microsoft.Graph instead.

Get Microsoft graph client.

[System.Obsolete("This method is deprecated. Please use GraphServiceClient(TokenCredential credential, IEnumerable<string> scopes = null, string baseUrl = null) from Microsoft.Graph instead.", false)]
public Microsoft.Graph.GraphServiceClient CreateMicrosoftGraphClient (Azure.Core.TokenCredential credential, string[] scopes, Microsoft.Extensions.Logging.ILogger<Microsoft.TeamsFx.MsGraphAuthProvider> logger = default);
[<System.Obsolete("This method is deprecated. Please use GraphServiceClient(TokenCredential credential, IEnumerable<string> scopes = null, string baseUrl = null) from Microsoft.Graph instead.", false)>]
member this.CreateMicrosoftGraphClient : Azure.Core.TokenCredential * string[] * Microsoft.Extensions.Logging.ILogger<Microsoft.TeamsFx.MsGraphAuthProvider> -> Microsoft.Graph.GraphServiceClient
Public Function CreateMicrosoftGraphClient (credential As TokenCredential, scopes As String(), Optional logger As ILogger(Of MsGraphAuthProvider) = Nothing) As GraphServiceClient

Parameters

credential
TokenCredential

Token credential instance.

scopes
String[]

The array of Microsoft Token scopes of access. Default value is [.default].

logger
ILogger<MsGraphAuthProvider>

Logger of MsGraphAuthProvider class. If the value is null, it will use the logger constructed by DI during TeamsFx class initialization.

Returns

Microsoft.Graph.GraphServiceClient

Graph client with specified scopes.

Attributes

Applies to