-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Samples
Doğan Erişen edited this page Sep 13, 2022
·
28 revisions
These samples showcase the most up-to-date usage of MSAL.js, while lacking detailed walkthroughs that might be necessary for new users. To review them, please refer to the /samples directory.
Samples here provide a more friendly introduction for setup and running, as well as explanation about how the code works.
Sample | Features | Level | Description |
---|---|---|---|
ms-identity-node | msal-node | Basic | Node.js & Express web application authenticating users against Azure AD. |
javascript-nodejs-desktop | msal-node | Basic | Electron desktop application authenticating users against Azure AD and calling Microsoft Graph. |
javascript-nodejs-console | msal-node | Basic | Node.js console daemon application using client-credentials flow to call Microsoft Graph. |
javascript-v2 | msal-browser | Basic | VanillaJS single-page application using MSAL.js v2.x and OAuth 2.0 Authorization Code Flow with PKCE on Microsoft identity platform. |
b2c-javascript-spa | msal-browser | Basic | B2C single-page application calling a web API using the OAuth 2.0 Authorization Code Flow with PKCE. |
javascript-angular-spa | msal-angular-v2 | Basic | Angular single-page application demonstrating how to login, logout, protect a route, and acquire an access token for a protected resource such as Microsoft Graph. |
javascript-react-spa | msal-react | Basic | React single-page application demonstrating how to login, logout, protect a route, and acquire an access token for a protected resource such as Microsoft Graph. |
ms-identity-javascript-tutorial | msal-browser | Comprehensive | A chapterwise tutorial that will take you through the fundamentals of authentication with Microsoft identity platform in Vanilla JavaScript. |
ms-identity-javascript-angular-tutorial | msal-angular | Comprehensive | A chapterwise tutorial that will take you through the fundamentals of authentication with Microsoft identity platform in Angular. |
ms-identity-javascript-react-tutorial | msal-react | Comprehensive | A chapterwise tutorial that will take you through the fundamentals of authentication with Microsoft identity platform in React. |
ms-identity-javascript-nodejs-tutorial | msal-node | Comprehensive | A chapterwise tutorial that will take you through the fundamentals of authentication with Microsoft identity platform in Node. |
For a full list MSAL code samples targeting JavaScript, .NET, Java, Python, Node, iOS, Android and other platforms, please refer to Microsoft identity platform code samples.