Dela via


AuthorizationCodeCredential Constructors

Definition

Overloads

AuthorizationCodeCredential()

Protected constructor for mocking.

AuthorizationCodeCredential(String, String, String, String)

Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code.

AuthorizationCodeCredential(String, String, String, String, AuthorizationCodeCredentialOptions)

Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code.

AuthorizationCodeCredential()

Source:
AuthorizationCodeCredential.cs
Source:
AuthorizationCodeCredential.cs

Protected constructor for mocking.

protected AuthorizationCodeCredential ();
Protected Sub New ()

Applies to

AuthorizationCodeCredential(String, String, String, String)

Source:
AuthorizationCodeCredential.cs
Source:
AuthorizationCodeCredential.cs

Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code.

public AuthorizationCodeCredential (string tenantId, string clientId, string clientSecret, string authorizationCode);
new Azure.Identity.AuthorizationCodeCredential : string * string * string * string -> Azure.Identity.AuthorizationCodeCredential
Public Sub New (tenantId As String, clientId As String, clientSecret As String, authorizationCode As String)

Parameters

tenantId
String

The Microsoft Entra tenant (directory) ID of the service principal.

clientId
String

The client (application) ID of the service principal

clientSecret
String

A client secret that was generated for the App Registration used to authenticate the client.

authorizationCode
String

The authorization code obtained from a call to authorize. The code should be obtained with all required scopes. See https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow for more information.

Applies to

AuthorizationCodeCredential(String, String, String, String, AuthorizationCodeCredentialOptions)

Source:
AuthorizationCodeCredential.cs
Source:
AuthorizationCodeCredential.cs

Creates an instance of the ClientSecretCredential with the details needed to authenticate against Microsoft Entra ID with a prefetched authorization code.

public AuthorizationCodeCredential (string tenantId, string clientId, string clientSecret, string authorizationCode, Azure.Identity.AuthorizationCodeCredentialOptions options);
new Azure.Identity.AuthorizationCodeCredential : string * string * string * string * Azure.Identity.AuthorizationCodeCredentialOptions -> Azure.Identity.AuthorizationCodeCredential
Public Sub New (tenantId As String, clientId As String, clientSecret As String, authorizationCode As String, options As AuthorizationCodeCredentialOptions)

Parameters

tenantId
String

The Microsoft Entra tenant (directory) ID of the service principal.

clientId
String

The client (application) ID of the service principal

clientSecret
String

A client secret that was generated for the App Registration used to authenticate the client.

authorizationCode
String

The authorization code obtained from a call to authorize. The code should be obtained with all required scopes. See https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow for more information.

options
AuthorizationCodeCredentialOptions

Options that allow to configure the management of the requests sent to Microsoft Entra ID.

Applies to