MSAL Library

MSAL stands for Microsoft Authentication Library
The Microsoft Authentication Library (MSAL) enables developers to acquire tokens from the Microsoft identity platform.
Once you have a token the user has been authenticated allowing them to access secured web APIs.
It can be used to provide secure access to Microsoft Graph, other Microsoft APIs, third-party web APIs, or your own web API
MSAL will cache the token for you, so you don't have to cache it in your application.
link - docs.microsoft.com/en-us/azure/active-directory/develop/msal-overview
link - developer.microsoft.com/en-us/identity/blogs/msal-js-2-0-supports-authorization-code-flow-is-now-generally-available/


MSAL - @azure/msal-browser

Released August 2020 and also referred to as MSAL v2.0.
Also known as Microsoft Identity Platform v2.0.
Work and School accounts and Personal accounts (Microsoft account) and Social accounts (Facebook, Google).
Uses OAuth 2.0 with PKCE (and does not support OAuth 2.0 Implicit Grant Flow).
PKCE is an acronym for Proof Key for Code Exchange and is pronounced "pixy".

import * as "msal_browser" from "msal-browser" 
const msal_Instance = new msal_browser.PublicClientApplication

link - npmjs.com/package/@azure/msal-browser
link - docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-javascript-auth-code

VersionRelease Date
2.22.12022 March
2.22.02022 February
2.21.02022 January
2.20.02021 December
2.19.02021 November
2.18.02021 October
2.17.02021 September
2.16.02021 August
2.15.02021 July
2.14.22021 May
2.14.02021 April
2.12.02021 March
2.11.02021 February
2.9.02021 January
2.8.02020 December
2.5.22020 November
2.3.02020 October
2.2.02020 September
2.1.02020 August
2.0.02020 July

acquireTokenPopup 
acquireTokenRedirect 
acquireTokenSilentThe library first checks the cache in browser storage to see if a valid token exists and returns it. When no valid token is in the cache, it attempts to use its refresh token to get the token. If the refresh token's 24-hour lifetime has expired, MSAL.js will open a hidden iframe to silently request a new authorization code, which it will exchange for a new, valid refresh token.
getAccountByUsername 
getAllAccounts 
loginPopup 
loginRedirectIf you include your API scope in the request then a MS GRaph access token will be returned
logout 
logoutPopup 

MSAL - @azure/msal

Released May 2019 and also referred to as MSAL v1.0.
Work and School accounts and Personal accounts (Microsoft account) and Social accounts (Facebook, Google).
Uses OAuth 2.0 Implicit Flow.
This package is no longer being updated.
This is exactly the same package as the one below (msal).
The only difference between them, is the name/naming convention.
This package was released a year later than the "msal" package.
This package was not updated regularly because of the small number of downloads, compared to the "msal" package.
link - npmjs.com/package/@azure/msal

VersionRelease Date
1.4.52021 February
1.3.12020 May
1.3.02020 April
1.2.02019 December
1.1.02019 July
1.0.02019 May
0.2.02018 August

MSAL - msal

Released May 2019 and also referred to as MSAL v1.0.
Work and School accounts and Personal accounts (Microsoft account) and Social accounts (Facebook, Google).
Uses OAuth 2.0 Implicit Flow.
This package is no longer being updated.

import * as "msal" from "msal" 
const msal_Instance = new msal.UserAgentApplication

link - npmjs.com/package/msal
link - docs.microsoft.com/en-us/azure/active-directory/develop/migrate-spa-implicit-to-auth-code#switch-redirect-uris-to-spa-platform
link - docs.microsoft.com/en-us/azure/active-directory/develop/msal-compare-msal-js-and-adal-js
link - youtube.com/watch?v=CHzERullHe8
link - youtube.com/watch?v=kf_VMt_Eh0M
link - github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/v1-migration.md

VersionRelease Date
1.4.162022 February
1.4.152021 November
1.4.142021 October
1.4.132021 August
1.4.122021 July
1.4.112021 May
1.4.102021 April
1.4.92021 March
1.4.82021 March
1.4.62021 February
1.4.52021 February
1.4.42020 November
1.4.22020 October
1.4.12020 September
1.4.02020 August
1.3.42020 August
1.3.32020 July
1.3.22020 July
1.3.12020 June
1.3.02020 April
1.2.02019 December
1.1.02019 July
1.0.02019 May
0.1.02017 May

ADAL - adal-vanilla

Released January 2016 and also known as Microsoft Identity Platform v1.0.
The Azure Active Directory Authentication Library for JavaScript (ADAL) .
Work and School accounts (no personal or social accounts).
Uses OAuth 1.0 Implicit Flow.
This package is no longer being updated. The last update was in 2018.
link - npmjs.com/package/adal-vanilla
link - github.com/AzureAD/azure-activedirectory-library-for-js
link - docs.microsoft.com/en-us/azure/active-directory/develop/msal-migration


Other Links

link - github.com/AzureAD/microsoft-authentication-library-for-js/issues/1072
link - docs.microsoft.com/en-us/azure/active-directory/develop/msal-node-migration
link - docs.microsoft.com/en-us/azure/active-directory/develop/scenario-spa-app-registration
link - docs.microsoft.com/en-us/graph/tutorials/javascript


© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext