OnBehalfOfCredential Constructors

Definition

Overloads

OnBehalfOfCredential()

Protected constructor for mocking.

OnBehalfOfCredential(String, String, X509Certificate2, String)

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate against Microsoft Entra ID with the specified certificate.

OnBehalfOfCredential(String, String, String, String)

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate with Microsoft Entra ID.

OnBehalfOfCredential(String, String, Func<String>, String, OnBehalfOfCredentialOptions)

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate against Microsoft Entra ID with the specified client assertion.

OnBehalfOfCredential(String, String, Func<CancellationToken,Task<String>>, String, OnBehalfOfCredentialOptions)

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate against Microsoft Entra ID with the specified client assertion.

OnBehalfOfCredential(String, String, X509Certificate2, String, OnBehalfOfCredentialOptions)

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate against Microsoft Entra ID with the specified certificate.

OnBehalfOfCredential(String, String, String, String, OnBehalfOfCredentialOptions)

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate with Microsoft Entra ID.

OnBehalfOfCredential()

Source:
OnBehalfOfCredential.cs
Source:
OnBehalfOfCredential.cs

Protected constructor for mocking.

protected OnBehalfOfCredential ();

Applies to

Azure SDK for .NET Preview e Azure SDK for .NET Latest
Prodotto Versioni
Azure SDK for .NET Latest, Preview

OnBehalfOfCredential(String, String, X509Certificate2, String)

Source:
OnBehalfOfCredential.cs
Source:
OnBehalfOfCredential.cs

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate against Microsoft Entra ID with the specified certificate.

public OnBehalfOfCredential (string tenantId, string clientId, System.Security.Cryptography.X509Certificates.X509Certificate2 clientCertificate, string userAssertion);

Parameters

tenantId
String

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

clientId
String

The client (application) ID of the service principal

clientCertificate
X509Certificate2

The authentication X509 Certificate of the service principal

userAssertion
String

The access token that will be used by OnBehalfOfCredential as the user assertion when requesting On-Behalf-Of tokens.

Applies to

Azure SDK for .NET Preview e Azure SDK for .NET Latest
Prodotto Versioni
Azure SDK for .NET Latest, Preview

OnBehalfOfCredential(String, String, String, String)

Source:
OnBehalfOfCredential.cs
Source:
OnBehalfOfCredential.cs

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate with Microsoft Entra ID.

public OnBehalfOfCredential (string tenantId, string clientId, string clientSecret, string userAssertion);

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.

userAssertion
String

The access token that will be used by OnBehalfOfCredential as the user assertion when requesting On-Behalf-Of tokens.

Applies to

Azure SDK for .NET Preview e Azure SDK for .NET Latest
Prodotto Versioni
Azure SDK for .NET Latest, Preview

OnBehalfOfCredential(String, String, Func<String>, String, OnBehalfOfCredentialOptions)

Source:
OnBehalfOfCredential.cs
Source:
OnBehalfOfCredential.cs

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate against Microsoft Entra ID with the specified client assertion.

public OnBehalfOfCredential (string tenantId, string clientId, Func<string> clientAssertionCallback, string userAssertion, Azure.Identity.OnBehalfOfCredentialOptions options = default);

Parameters

tenantId
String

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

clientId
String

The client (application) ID of the service principal

clientAssertionCallback
Func<String>

A synchronous callback returning a valid client assertion used to authenticate the service principal.

userAssertion
String

The access token that will be used by OnBehalfOfCredential as the user assertion when requesting On-Behalf-Of tokens.

options
OnBehalfOfCredentialOptions

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

Applies to

Azure SDK for .NET Preview e Azure SDK for .NET Latest
Prodotto Versioni
Azure SDK for .NET Latest, Preview

OnBehalfOfCredential(String, String, Func<CancellationToken,Task<String>>, String, OnBehalfOfCredentialOptions)

Source:
OnBehalfOfCredential.cs
Source:
OnBehalfOfCredential.cs

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate against Microsoft Entra ID with the specified client assertion.

public OnBehalfOfCredential (string tenantId, string clientId, Func<System.Threading.CancellationToken,System.Threading.Tasks.Task<string>> clientAssertionCallback, string userAssertion, Azure.Identity.OnBehalfOfCredentialOptions options = default);

Parameters

tenantId
String

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

clientId
String

The client (application) ID of the service principal

clientAssertionCallback
Func<CancellationToken,Task<String>>

An asynchronous callback returning a valid client assertion used to authenticate the service principal.

userAssertion
String

The access token that will be used by OnBehalfOfCredential as the user assertion when requesting On-Behalf-Of tokens.

options
OnBehalfOfCredentialOptions

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

Applies to

Azure SDK for .NET Preview e Azure SDK for .NET Latest
Prodotto Versioni
Azure SDK for .NET Latest, Preview

OnBehalfOfCredential(String, String, X509Certificate2, String, OnBehalfOfCredentialOptions)

Source:
OnBehalfOfCredential.cs
Source:
OnBehalfOfCredential.cs

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate against Microsoft Entra ID with the specified certificate.

public OnBehalfOfCredential (string tenantId, string clientId, System.Security.Cryptography.X509Certificates.X509Certificate2 clientCertificate, string userAssertion, Azure.Identity.OnBehalfOfCredentialOptions options);

Parameters

tenantId
String

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

clientId
String

The client (application) ID of the service principal

clientCertificate
X509Certificate2

The authentication X509 Certificate of the service principal

userAssertion
String

The access token that will be used by OnBehalfOfCredential as the user assertion when requesting On-Behalf-Of tokens.

options
OnBehalfOfCredentialOptions

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

Applies to

Azure SDK for .NET Preview e Azure SDK for .NET Latest
Prodotto Versioni
Azure SDK for .NET Latest, Preview

OnBehalfOfCredential(String, String, String, String, OnBehalfOfCredentialOptions)

Source:
OnBehalfOfCredential.cs
Source:
OnBehalfOfCredential.cs

Creates an instance of the OnBehalfOfCredential with the details needed to authenticate with Microsoft Entra ID.

public OnBehalfOfCredential (string tenantId, string clientId, string clientSecret, string userAssertion, Azure.Identity.OnBehalfOfCredentialOptions options);

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.

userAssertion
String

The access token that will be used by OnBehalfOfCredential as the user assertion when requesting On-Behalf-Of tokens.

options
OnBehalfOfCredentialOptions

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

Applies to

Azure SDK for .NET Preview e Azure SDK for .NET Latest
Prodotto Versioni
Azure SDK for .NET Latest, Preview