ManagedIdentityCredential Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ManagedIdentityCredential() |
Protected constructor for mocking. |
ManagedIdentityCredential(ResourceIdentifier, TokenCredentialOptions) |
Creates an instance of the ManagedIdentityCredential capable of authenticating a resource with a managed identity. |
ManagedIdentityCredential(String, TokenCredentialOptions) |
Creates an instance of the ManagedIdentityCredential capable of authenticating a resource with a managed identity. |
ManagedIdentityCredential()
- Source:
- ManagedIdentityCredential.cs
- Source:
- ManagedIdentityCredential.cs
Protected constructor for mocking.
protected ManagedIdentityCredential ();
Protected Sub New ()
Applies to
ManagedIdentityCredential(ResourceIdentifier, TokenCredentialOptions)
- Source:
- ManagedIdentityCredential.cs
- Source:
- ManagedIdentityCredential.cs
Creates an instance of the ManagedIdentityCredential capable of authenticating a resource with a managed identity.
public ManagedIdentityCredential (Azure.Core.ResourceIdentifier resourceId, Azure.Identity.TokenCredentialOptions options = default);
new Azure.Identity.ManagedIdentityCredential : Azure.Core.ResourceIdentifier * Azure.Identity.TokenCredentialOptions -> Azure.Identity.ManagedIdentityCredential
Public Sub New (resourceId As ResourceIdentifier, Optional options As TokenCredentialOptions = Nothing)
Parameters
- resourceId
- ResourceIdentifier
The resource ID to authenticate for a user-assigned managed identity. More information on user-assigned managed identities can be found at https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview#how-a-user-assigned-managed-identity-works-with-an-azure-vm.
- options
- TokenCredentialOptions
Options to configure the management of the requests sent to Microsoft Entra ID.
Applies to
ManagedIdentityCredential(String, TokenCredentialOptions)
- Source:
- ManagedIdentityCredential.cs
- Source:
- ManagedIdentityCredential.cs
Creates an instance of the ManagedIdentityCredential capable of authenticating a resource with a managed identity.
public ManagedIdentityCredential (string clientId = default, Azure.Identity.TokenCredentialOptions options = default);
new Azure.Identity.ManagedIdentityCredential : string * Azure.Identity.TokenCredentialOptions -> Azure.Identity.ManagedIdentityCredential
Public Sub New (Optional clientId As String = Nothing, Optional options As TokenCredentialOptions = Nothing)
Parameters
- clientId
- String
The client ID to authenticate for a user-assigned managed identity. More information on user-assigned managed identities can be found at https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview#how-a-user-assigned-managed-identity-works-with-an-azure-vm.
- options
- TokenCredentialOptions
Options to configure the management of the requests sent to Microsoft Entra ID.
Applies to
Azure SDK for .NET
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for