Table of Contents

Class ManagedIdentityId

Namespace
Microsoft.Identity.Client.AppConfig
Assembly
Microsoft.Identity.Client.dll

Class to store configuration for a managed identity enabled on a resource. For a system assigned managed identity use ManagedIdentityId.SystemAssigned. For user assigned managed identity use ManagedIdentityId.WithUserAssignedClientId("clientId") or ManagedIdentityId.WithUserAssignedResourceId("resourceId") or ManagedIdentityId.WithUserAssignedObjectId("objectid"). For more details see https://aka.ms/msal-net-managed-identity

public class ManagedIdentityId
Inheritance
ManagedIdentityId
Inherited Members

Properties

SystemAssigned

Create an instance of ManagedIdentityId for a system assigned managed identity.

public static ManagedIdentityId SystemAssigned { get; }

Property Value

ManagedIdentityId

Methods

WithUserAssignedClientId(string)

Create an instance of ManagedIdentityId for a user assigned managed identity from a client id.

public static ManagedIdentityId WithUserAssignedClientId(string clientId)

Parameters

clientId string

Client id of the user assigned managed identity assigned to the azure resource.

Returns

ManagedIdentityId

Instance of ManagedIdentityId.

Exceptions

ArgumentNullException

WithUserAssignedObjectId(string)

Create an instance of ManagedIdentityId for a user assigned managed identity from an object id.

public static ManagedIdentityId WithUserAssignedObjectId(string objectId)

Parameters

objectId string

Object id of the user assigned managed identity assigned to the azure resource.

Returns

ManagedIdentityId

Instance of ManagedIdentityId.

Exceptions

ArgumentNullException

WithUserAssignedResourceId(string)

Create an instance of ManagedIdentityId for a user assigned managed identity from a resource id.

public static ManagedIdentityId WithUserAssignedResourceId(string resourceId)

Parameters

resourceId string

Resource id of the user assigned managed identity assigned to the azure resource.

Returns

ManagedIdentityId

Instance of ManagedIdentityId.

Exceptions

ArgumentNullException