Compartilhar via


ITokenProvider.GetAccessToken Method

Definition

Get a new login token for the given environment, user credential, and credential type.

public Microsoft.Azure.Commands.Common.Authentication.IAccessToken GetAccessToken (Microsoft.Azure.Commands.Common.Authentication.AdalConfiguration config, string promptBehavior, Action<string> promptAction, string userId, System.Security.SecureString password, string credentialType);
abstract member GetAccessToken : Microsoft.Azure.Commands.Common.Authentication.AdalConfiguration * string * Action<string> * string * System.Security.SecureString * string -> Microsoft.Azure.Commands.Common.Authentication.IAccessToken
Public Function GetAccessToken (config As AdalConfiguration, promptBehavior As String, promptAction As Action(Of String), userId As String, password As SecureString, credentialType As String) As IAccessToken

Parameters

config
AdalConfiguration

Configuration.

promptBehavior
String

Prompt behavior.

promptAction
Action<String>

Prompt action for device flow.

userId
String

User ID/Service principal to get the token for.

password
SecureString

Secure strings with password/service principal key.

credentialType
String

Credential type.

Returns

An access token.

Applies to