AzureCredentialsFactory.FromServicePrincipal Method

Definition

Overloads

FromServicePrincipal(String, X509Certificate2, String, AzureEnvironment)

Creates a credentials object from a service principal.

FromServicePrincipal(String, String, String, AzureEnvironment)

Creates a credentials object from a service principal.

FromServicePrincipal(String, X509Certificate2, Boolean, String, AzureEnvironment)

Creates a credentials object from a service principal.

FromServicePrincipal(String, String, String, String, AzureEnvironment)

Creates a credentials object from a service principal.

FromServicePrincipal(String, String, String, Boolean, String, AzureEnvironment)

Creates a credentials object from a service principal.

FromServicePrincipal(String, X509Certificate2, String, AzureEnvironment)

Creates a credentials object from a service principal.

public Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials FromServicePrincipal (string clientId, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, string tenantId, Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment environment);
member this.FromServicePrincipal : string * System.Security.Cryptography.X509Certificates.X509Certificate2 * string * Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment -> Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials
Public Function FromServicePrincipal (clientId As String, certificate As X509Certificate2, tenantId As String, environment As AzureEnvironment) As AzureCredentials

Parameters

clientId
String

the client ID of the application the service principal is associated with

certificate
X509Certificate2

the X509 certificate for the client ID

tenantId
String

the tenant ID or domain the application is in

environment
AzureEnvironment

the environment to authenticate to

Returns

Applies to

FromServicePrincipal(String, String, String, AzureEnvironment)

Creates a credentials object from a service principal.

public virtual Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials FromServicePrincipal (string clientId, string clientSecret, string tenantId, Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment environment);
abstract member FromServicePrincipal : string * string * string * Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment -> Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials
override this.FromServicePrincipal : string * string * string * Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment -> Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials
Public Overridable Function FromServicePrincipal (clientId As String, clientSecret As String, tenantId As String, environment As AzureEnvironment) As AzureCredentials

Parameters

clientId
String

the client ID of the application the service principal is associated with

clientSecret
String

the secret for the client ID

tenantId
String

the tenant ID or domain the application is in

environment
AzureEnvironment

the environment to authenticate to

Returns

an authenticated credentials object

Applies to

FromServicePrincipal(String, X509Certificate2, Boolean, String, AzureEnvironment)

Creates a credentials object from a service principal.

public Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials FromServicePrincipal (string clientId, System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, bool IsCertificateRollOverEnabled, string tenantId, Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment environment);
member this.FromServicePrincipal : string * System.Security.Cryptography.X509Certificates.X509Certificate2 * bool * string * Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment -> Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials
Public Function FromServicePrincipal (clientId As String, certificate As X509Certificate2, IsCertificateRollOverEnabled As Boolean, tenantId As String, environment As AzureEnvironment) As AzureCredentials

Parameters

clientId
String

the client ID of the application the service principal is associated with

certificate
X509Certificate2

the X509 certificate for the client ID

IsCertificateRollOverEnabled
Boolean

Set it to true if certificate KeyVault/dSMS assistend certificate (Auto Rotation)

tenantId
String

the tenant ID or domain the application is in

environment
AzureEnvironment

the environment to authenticate to

Returns

Applies to

FromServicePrincipal(String, String, String, String, AzureEnvironment)

Creates a credentials object from a service principal.

public Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials FromServicePrincipal (string clientId, string certificatePath, string certificatePassword, string tenantId, Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment environment);
member this.FromServicePrincipal : string * string * string * string * Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment -> Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials
Public Function FromServicePrincipal (clientId As String, certificatePath As String, certificatePassword As String, tenantId As String, environment As AzureEnvironment) As AzureCredentials

Parameters

clientId
String

the client ID of the application the service principal is associated with

certificatePath
String

the certificate file for the client ID

certificatePassword
String

the password for the certificate

tenantId
String

the tenant ID or domain the application is in

environment
AzureEnvironment

the environment to authenticate to

Returns

an authenticated credentials object

Applies to

FromServicePrincipal(String, String, String, Boolean, String, AzureEnvironment)

Creates a credentials object from a service principal.

public Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials FromServicePrincipal (string clientId, string certificatePath, string certificatePassword, bool IsCertificateRollOverEnabled, string tenantId, Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment environment);
member this.FromServicePrincipal : string * string * string * bool * string * Microsoft.Azure.Management.ResourceManager.Fluent.AzureEnvironment -> Microsoft.Azure.Management.ResourceManager.Fluent.Authentication.AzureCredentials
Public Function FromServicePrincipal (clientId As String, certificatePath As String, certificatePassword As String, IsCertificateRollOverEnabled As Boolean, tenantId As String, environment As AzureEnvironment) As AzureCredentials

Parameters

clientId
String

the client ID of the application the service principal is associated with

certificatePath
String

the certificate file for the client ID

certificatePassword
String

the password for the certificate

IsCertificateRollOverEnabled
Boolean

Set it to true if certificate KeyVault/dSMS assistend certificate (Auto Rotation)

tenantId
String

the tenant ID or domain the application is in

environment
AzureEnvironment

the environment to authenticate to

Returns

an authenticated credentials object

Applies to