CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 01:28:31 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"69ac53726f3cbd9b8d7e38b8581c99d8"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=HjqmT7Q4pK%2FCMCN7AL4xX1cu5KYDK%2Ftj0%2B8v%2BU6CvmW9nxErFpnnzTrW0Maf2mxvnhfa5oPbCAQaHBc6c9bzDWJbQYn0PQLj4FA6t%2F7oR06GtQ%2B8BmjnilErpXEoPNL8AmfHO5rZTOSZ5rbMFSV%2F6aHq%2FUgJHJDV9AXVsqoUkAEdLlikk78BbAmeY6UdBVcab%2Fv2OfKzIAPwhkFYv0%2FILmFzlQPGjwWRZ3J5JSIGvsbDvBabDCR%2FRYC%2F%2Fr6L4pw0Gr8ESxiVfxc6bYj10nP1bg%3D%3D--VXWCQuZALOxqw0Br--Fcq7K4vRDZTvbn3QQtExwA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.44970745.1753320511; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 01:28:31 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 01:28:31 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: EA92:3CFE7:20056E:2D791C:68818C3F
Samples · AzureAD/microsoft-authentication-library-for-js Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
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.
Clone this wiki locally
You can’t perform that action at this time.