Microsoft.Identity.Client.PublicClientApplication
public sealed class PublicClientApplication : ClientApplicationBase, IPublicClientApplication, IClientApplicationBase, IApplicationBase, IByRefreshToken
A special account value that indicates that the current operating system account should be used
to log the user in. Not all operating systems and authentication flows support this concept, in which
case calling AcquireTokenSilent will throw an MsalUiRequiredException.
public AcquireTokenByIntegratedWindowsAuthParameterBuilder AcquireTokenByIntegratedWindowsAuth(IEnumerable<string> scopes)
public AcquireTokenByUsernamePasswordParameterBuilder AcquireTokenByUsernamePassword(IEnumerable<string> scopes, string username, SecureString password)
public AcquireTokenByUsernamePasswordParameterBuilder AcquireTokenByUsernamePassword(IEnumerable<string> scopes, string username, string password)
public AcquireTokenWithDeviceCodeParameterBuilder AcquireTokenWithDeviceCode(IEnumerable<string> scopes, Func<DeviceCodeResult, Task> deviceCodeResultCallback)
Returns true if an authentication broker can be used.
This method is only needed for mobile scenarios which support Mobile Application Management (MAM). In other cases, use WithBroker, which will fall back to use a browser if an authentication broker is unavailable.
Returns true if MSAL can use an embedded web view (web browser).
Used to determine if the currently available broker is able to perform Proof-of-Possession.
Returns false when the application runs in headless mode (e.g., when SSH-d into a Linux machine).
Browsers (web views) and brokers cannot be used if there is no UI support. For those scenarios, use AcquireTokenWithDeviceCode.