vifani.com

MSAL: One Library to Authenticate Them All | - Raffaele Fanizzi

7/23/2021Updated 3/20/2026

Excerpt

The only exception is the **OAuth 2.0 Resource Owner Password Credentials flow** that I have marked as **NOT RECOMMENDED** because in this flow we need from the UI of our app to ask the user his/her credentials. Then we pass credentials as input to MSAL. So in this case we are directly handling sensitive information and this should be avoided. … ### Define authentication details There is a strict relationship between the authentication configuration and the OAuth Flows that will be enabled by Azure AD for your app. However this complexity is hidden by the definition of the type of platform of you application. For example choosing Web platform, the **OAuth 2.0 Authorization code** flow will be enabled, while choosing Single Page Application platform will enable the **OAuth 2.0 Authorization code with PKCE** flow. … ## MSAL vs ADAL If you have used ADAL library, we can consider MSAL as its successor. The following are the main differences between the two libraries: - ADAL supports only Azure AD v1 endpoints and tokens, MSAL supports both v1 and v2 - ADAL supports only resources based tokens, MSAL also works with scopes based token - Because of the first point, ADAL supports only work and school accounts, while MSAL supports Microsoft Personal accounts and Azure AD B2C as well

Source URL

https://vifani.com/msal-one-library-to-authenticate-them-all/

Related Pain Points