msal_auth library

Classes

Account
AndroidConfig
Configuration class for Android platform.
AppleConfig
Configuration class for iOS & MacOS platform.
AuthenticationResult
MsalUser
Microsoft user details.
MultipleAccountPca
This class is used to create public client application for multiple account mode.
PublicClientApplication
This is the super class for MSAL public client application. developer should use the child classes to create the app based on the need.
SingleAccountPca
This class is used to create public client application for single account mode.

Enums

AuthorityType
Type of authority to authenticate against.
Broker
Types of broker that is used while authenticating user.
Prompt
The UI options that developer can pass during interactive token acquisition requests.

Constants

kMethodChannel → const MethodChannel

Exceptions / Errors

MsalArgumentException
Occurs when an invalid argument is passed to one of the MSAL API methods. This can include invalid configurations, null or malformed inputs, or missing required arguments.
MsalClientException
This exception class represents general errors that are local to the library. Below is the table of proposed codes and a short description of each.
MsalDeclinedScopeException
Exception class to indicate that one or more requested scopes have been declined by the server. Developers can opt to continue acquiring token by passing the grantedScopes and calling "acquireTokenSilent" call on this error.
MsalException
Exception thrown by the MSAL SDK. see the particular child class of MsalException for more specific details.
MsalInsufficientDeviceStrengthException
This exception indicates that the device does not meet the security or performance requirements for completing the authentication process.
MsalInternalException
An unrecoverable error occured either within the MSAL client or on server side. More detailed information about the specific error can be found in "MSALInternalError" enum.
MsalPcaInitException
This exception is created from Dart to validate that application is initialized. SDK will throw this if any method from "PublicClientApplication" class is called without creating the object of it.
MsalProtectionPolicyRequiredException
The requested resource is protected by an Intune Conditional Access policy. Please see https://aka.ms/intuneMAMSDK for more information.
MsalServerException
Occurs when the server (Azure Active Directory or its related services) encounters an issue and fails to process the request properly. This error typically indicates that something went wrong on the server side, such as a transient failure, misconfiguration, or other backend-related problems.
MsalServiceException
This exception class represents errors when communicating to the service, can be from the authorize or token endpoints. Generally, these errors are resolved by fixing app configurations either in code or in the app registration portal.
MsalUiRequiredException
This exception indicates that UI is required for authentication to succeed.
MsalUnsupportedBrokerException
Representing all exceptions that occur due to an unsupported / incompatible broker.
MsalUserCancelException
MSAL internal exception for user cancelling the flow.
MsalWorkplaceJoinRequiredException
Workplace join is required to proceed. Handling of this error is optional.