語言

ManagedIdentityApplication 類別

定義

類別用於管理身份應用程式(如 Azure 資源如 App Services、虛擬機器、Azure Arc、Service Fabric 和 Cloud Shell)。

public sealed class ManagedIdentityApplication : Microsoft.Identity.Client.ApplicationBase, Microsoft.Identity.Client.IManagedIdentityApplication
type ManagedIdentityApplication = class
    inherit ApplicationBase
    interface IManagedIdentityApplication
    interface IApplicationBase
Public NotInheritable Class ManagedIdentityApplication
Inherits ApplicationBase
Implements IManagedIdentityApplication
繼承
ManagedIdentityApplication
實作

備註

管理式身份可以在 Azure 資源上啟用,作為系統指派的管理身份或使用者指定的管理式識別碼。

方法

名稱 Description
AcquireTokenForManagedIdentity(String)

取得在 Azure 資源上配置的受管理身份的令牌。 參見 https://aka.ms/msal-net-managed-identity。

GetManagedIdentityCapabilitiesAsync(CancellationToken)

偵測主機可用的管理身份來源及主機能產生的最強 mTLS 綁定。 對於憑證鏈(例如 DefaultAzureCredential)來說非常有用,用來判斷是否可用管理身份,以及預期的約束強度。

GetManagedIdentityCapabilitiesAsync(ManagedIdentityCapabilitiesOptions, CancellationToken)

利用提供的發現選項,偵測主機可用的受管理身份來源及主機能產生的最強 mTLS 綁定。

GetManagedIdentitySource()
已淘汰.

偵測並回傳環境中可用的管理身份來源。

適用於