語言

ApplicationOptions 類別

定義

選項物件的基底類別,其字串值可從設定檔載入(例如 JSON 檔案,如 asp.net 設定情境中)另見 https://aka.ms/msal-net-application-configuration 導出類別 PublicClientApplicationOptions 及 ConfidentialClientApplicationOptions

public abstract class ApplicationOptions : Microsoft.Identity.Client.BaseApplicationOptions
type ApplicationOptions = class
    inherit BaseApplicationOptions
Public MustInherit Class ApplicationOptions
Inherits BaseApplicationOptions
繼承
ApplicationOptions
衍生

建構函式

名稱 Description
ApplicationOptions()

選項物件的基底類別,其字串值可從設定檔載入(例如 JSON 檔案,如 asp.net 設定情境中)另見 https://aka.ms/msal-net-application-configuration 導出類別 PublicClientApplicationOptions 及 ConfidentialClientApplicationOptions

屬性

名稱 Description
AadAuthorityAudience

簽到觀眾。 此物業與 TenantID 互斥。 若兩者皆提供,將產生例外。

AzureCloudInstance

針對 Azure Active Directory 的具體實例。 它允許使用者使用列舉而非明確的網址。 此性質與 Instance互斥。 若兩者皆提供,將產生例外。

ClientCapabilities

Microsoft Identity 專屬的 OIDC 擴充功能,允許在不需互動的情況下解決資源挑戰。 允許設定一個或多個用戶端功能,例如「llt」

ClientId

應用程式註冊入口網站https://aka.ms/msal-net-register-app中註冊的客戶端 ID(亦稱 App ID)

ClientName

呼叫應用程式的名稱,用於遙測用途。

ClientVersion

用於遙測目的的呼叫應用程式版本。

EnablePiiLogging

標記以啟用或停用個人識別資訊(PII)的記錄。 PII 日誌絕不會寫入預設輸出,例如 Console、Logcat 或 NSLog,預設設定為 false,以確保你的應用程式符合 GDPR 規範。 你可以設定為 進 true 階除錯,需要 PII。 請參閱 https://aka.ms/msal-net-logging

(繼承來源 BaseApplicationOptions)
Instance

STS 實例(例如 https://login.microsoftonline.com Azure 公有雲)。 此名稱的選擇是為了確保與 ASP.NET Core 中的 AzureAdOptions 相容。 此性質與 AzureCloudInstance互斥。 若兩者皆提供,將產生例外。

IsDefaultPlatformLoggingEnabled

標記以啟用或停用平台預設的日誌記錄。 在桌面版則使用事件追蹤。 在 iOS 中,使用 NSLog。 在 Android 中,使用 logcat。 預設值為 false。 請參閱 https://aka.ms/msal-net-logging

(繼承來源 BaseApplicationOptions)
KerberosServicePrincipalName
已淘汰.

Kerberos 服務票的主要服務名稱。

LegacyCacheCompatibilityEnabled

啟用舊有的 ADAL 快取序列化與反序列化。

LogLevel

讓你能設定想要的日誌層級。 預設值為 Info。 設定為 只會 Error 出現錯誤 設定 Warning 為 只會出現錯誤和警告等等。 請參閱 https://aka.ms/msal-net-logging

(繼承來源 BaseApplicationOptions)
RedirectUri

這個重定向 URI 需要在應用程式註冊中註冊。 請參閱 https://aka.ms/msal-net-register-app MSAL.NET 預設定義的重定向 URI 及其註冊方式。 另請使用: WithDefaultRedirectUri() ,為所有平台的公開客戶端應用程式提供了良好的預設。

對於網頁應用程式和網頁 API,重定向 URI 是從應用程式執行的 URL 計算出來的(例如 baseUrl//signin-oidc ASP.NET Core 網頁應用程式)。

對於守護進程應用程式(僅使用呼叫 AcquireTokenForClient的用戶端憑證流程的機密用戶端應用程式),則不需要回應 URI。

TenantId

應用程式會允許使用者簽署的租戶。 這可以是:與租戶相關的網域、GUID(租戶 ID)或元租戶(例如消費者)。 此性質與 AadAuthorityAudience互斥。 若兩者皆提供,將產生例外。

TicketContainer
已淘汰.

Kerberos 服務票據容器將用於使用。

適用於