<PackageReference Include="Microsoft.Identity.Client" Version="4.84.2" />

Microsoft.Identity.Client.PublicClientApplicationBuilder

public static PublicClientApplicationBuilder Create(string clientId)

Creates a PublicClientApplicationBuilder from a clientID. See https://aka.ms/msal-net-application-configuration

Creates a PublicClientApplicationBuilder from public client application configuration options. See https://aka.ms/msal-net-application-configuration

Builds an instance of IPublicClientApplication from the parameters set in the PublicClientApplicationBuilder.

public bool IsBrokerAvailable()

Returns true if a broker can be used. This method is only needed to be used in mobile scenarios which support Mobile Application Management. In other supported scenarios, use WithBroker by itself, which will fall back to use a browser if broker is unavailable.

public PublicClientApplicationBuilder WithBroker(bool enableBroker = true)

Configures the public client application to use the recommended reply URI for the platform. See https://aka.ms/msal-net-default-reply-uri. PlatformDefault Reply URI.NET desktop`https://login.microsoftonline.com/common/oauth2/nativeclient`For system browser on .NET Corehttp://localhost NOTE:There will be an update to the default redirect URI in the future to accommodate for system browsers on the .NET desktop and .NET Core platforms.

public PublicClientApplicationBuilder WithIosKeychainSecurityGroup(string keychainSecurityGroup)

You can specify a Keychain Access Group to use for persisting the token cache across multiple applications. This enables you to share the token cache between several applications having the same Keychain access group. Sharing the token cache allows single sign-on between all of the applications that use the same Keychain access Group. See https://aka.ms/msal-net-ios-keychain-security-group for more information.

public PublicClientApplicationBuilder WithKerberosTicketClaim(string servicePrincipalName, KerberosTicketContainer ticketContainer)

Sets the parameters required to get a Kerberos Ticket from Azure AD service.

public PublicClientApplicationBuilder WithMultiCloudSupport(bool enableMultiCloudSupport)

Enables multi cloud support for this instance of public client application. It enables applications to use in a global public cloud authority to the library and can still get tokens for resources from sovereign clouds.

Adds a known authority corresponding to a generic OpenIdConnect Identity Provider. MSAL will append ".well-known/openid-configuration" to the authority and retrieve the OIDC metadata from there, to figure out the endpoints. See https://openid.net/specs/openid-connect-core-1_0.html#Terminology

public PublicClientApplicationBuilder WithParentActivityOrWindow(Func<object> parentActivityOrWindowFunc)

Sets a reference to the ViewController (if using iOS), Activity (if using Android) IWin32Window or IntPtr (if using .Net Framework). Used for invoking the browser.

Sets a reference to the IntPtr to a window that triggers the browser to be shown. Used to center the browser that pop-up onto this window.

Allows customization of the Windows 10 Broker experience.