msal_js library

A wrapper for the core msal.js library.

This library expects that msal.js has loaded and exposed the global Msal JavaScript object, as that is how this library interacts with MSAL. A MissingMsalJsException will be thrown if this library is used before the global Msal object is available.

Instantiate a UserAgentApplication to get started.

Classes

Account
An authenticated user account.
AuthOptions
Used to configure the auth options for a UserAgentApplication.
AuthRequest
Used to configure an authentication request. [...]
AuthResponse
A response from an auth request.
CacheOptions
Used to configure the cache options for a UserAgentApplication.
Configuration
Used to configure a UserAgentApplication.
FrameworkOptions
Logger
A logger for an MSAL UserAgentApplication. [...]
LoggerOptions
Additional configuration options for a Logger.
SystemOptions
Used to configure library specific options for a UserAgentApplication.
UserAgentApplication
An MSAL authentication context. [...]

Enums

CacheLocation
A browser cache location.
LogLevel
The severity of a log message.

Typedefs

AuthResponseCallback(AuthException error, [AuthResponse response]) → void
A callback for an authentication response after a redirect. [...]
LoggerCallback(LogLevel level, String message, bool containsPii) → void
A callback for an MSAL log message. [...]
RedirectUriCallback() → String
A callback used for letting MSAL retrieve a redirect URI from the application dynamically. [...]

Exceptions / Errors

AuthException
A general error thrown by MSAL.
ClientAuthException
Thrown by MSAL when there is an error in the client code running on the browser.
ClientConfigurationException
Thrown by MSAL when there is an error in the configuration of a library object.
InteractionRequiredAuthException
Thrown by MSAL when the user is required to perform an interactive token request.
MissingMsalJsException
Thrown when package:msal_js is used before msal.js has loaded. [...]
ServerException
Thrown by MSAL when there is an error with the server code, for example, unavailability.