Share via


TeamsUserCredential Constructor

Definition

Constructor of TeamsUserCredential. Developer need to configure TeamsFx service before using this class.

public TeamsUserCredential (Microsoft.Extensions.Options.IOptions<Microsoft.TeamsFx.Configuration.AuthenticationOptions> authenticationOptions, Microsoft.JSInterop.IJSRuntime jsRuntime, Microsoft.Extensions.Logging.ILogger<Microsoft.TeamsFx.TeamsUserCredential> logger, Microsoft.TeamsFx.Helper.IIdentityClientAdapter identityClientAdapter);
new Microsoft.TeamsFx.TeamsUserCredential : Microsoft.Extensions.Options.IOptions<Microsoft.TeamsFx.Configuration.AuthenticationOptions> * Microsoft.JSInterop.IJSRuntime * Microsoft.Extensions.Logging.ILogger<Microsoft.TeamsFx.TeamsUserCredential> * Microsoft.TeamsFx.Helper.IIdentityClientAdapter -> Microsoft.TeamsFx.TeamsUserCredential
Public Sub New (authenticationOptions As IOptions(Of AuthenticationOptions), jsRuntime As IJSRuntime, logger As ILogger(Of TeamsUserCredential), identityClientAdapter As IIdentityClientAdapter)

Parameters

authenticationOptions
IOptions<AuthenticationOptions>

Authentication options filled by DI.

jsRuntime
IJSRuntime

JavaScript interop runtime.

logger
ILogger<TeamsUserCredential>

Logger of TeamsUserCredential Class.

identityClientAdapter
IIdentityClientAdapter

Global instance of adaptor to call MSAL.NET library

Exceptions

When client id, client secret, initiate login endpoint or OAuth authority is missing or invalid in config.

Applies to