All Projects → Azure-Samples → ms-identity-javascript-tutorial

Azure-Samples / ms-identity-javascript-tutorial

Licence: MIT license
A chapterwise tutorial that will take you through the fundamentals of modern authentication with Microsoft identity platform in Vanilla JavaScript.

Programming Languages

javascript
184084 projects - #8 most used programming language
powershell
5483 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to ms-identity-javascript-tutorial

ms-identity-javascript-react-tutorial
A chapterwise tutorial that will take you through the fundamentals of modern authentication with Microsoft identity platform in React using MSAL React
Stars: ✭ 100 (+0%)
Mutual labels:  azure-active-directory, msal, ms-graph, microsoft-identity-platform, msal-js
ms-identity-javascript-react-spa-dotnetcore-webapi-obo
A React & Redux single-page application that authorizes an ASP.NET Core web API to call MS Graph API on-behalf-of a signed-in user.
Stars: ✭ 62 (-38%)
Mutual labels:  ms-graph, authorization-code-flow, microsoft-identity-platform, msal-js
ms-identity-javascript-angular-spa-aspnet-webapi-multitenant
Multi-tenancy tutorial demonstrating how to expose your app to users from other tenants, provide consent as admin and deploy it on Azure App Services using MSAL Angular
Stars: ✭ 18 (-82%)
Mutual labels:  azure-active-directory, microsoft-identity-platform, azure-app-services, msal-js
ms-identity-javascript-angular-spa-aspnetcore-webapi
An Angular single-page application that authenticates users with Azure AD and calls a protected ASP.NET Core web API using MSAL Angular
Stars: ✭ 72 (-28%)
Mutual labels:  microsoft-identity-platform, msal-js, pkce-flow
react-native-msal
MSAL for React Native
Stars: ✭ 62 (-38%)
Mutual labels:  azure-active-directory, msal, azure-active-directory-b2c
ms-identity-javascript-v2
VanillaJS sample using MSAL.js v2.x and OAuth 2.0 Authorization Code Flow with PKCE on Microsoft identity platform
Stars: ✭ 67 (-33%)
Mutual labels:  single-page-application, msal-js
AzureADAuthRazorUiServiceApiCertificate
Azure AD flows using ASP.NET Core and Microsoft.Identity
Stars: ✭ 41 (-59%)
Mutual labels:  oidc, microsoft-identity-platform
ms-identity-mobile-apple-swift-objc
An iOS sample in Swift that authenticates Microsoft Account and Azure AD users and calls the Graph API using OAuth 2.0
Stars: ✭ 61 (-39%)
Mutual labels:  azure-active-directory, msal
AzureChamp
A repository for Azure Champ program to train technical experts to get ready for Azure
Stars: ✭ 16 (-84%)
Mutual labels:  azure-active-directory, azure-storage
fastapi-azure-auth
Easy and secure implementation of Azure AD for your FastAPI APIs 🔒 B2C, single- and multi-tenant support.
Stars: ✭ 174 (+74%)
Mutual labels:  azure-active-directory, oidc
token-cli
Command line utility for interacting with OAuth2 infrastructure to generate tokens
Stars: ✭ 19 (-81%)
Mutual labels:  authorization, oidc
authentik
The authentication glue you need.
Stars: ✭ 2,941 (+2841%)
Mutual labels:  authorization, oidc
Hydra
OpenID Certified™ OpenID Connect and OAuth Provider written in Go - cloud native, security-first, open source API security for your infrastructure. SDKs for any language. Compatible with MITREid.
Stars: ✭ 11,884 (+11784%)
Mutual labels:  authorization, oidc
OpenAM
OpenAM is an open access management solution that includes Authentication, SSO, Authorization, Federation, Entitlements and Web Services Security.
Stars: ✭ 476 (+376%)
Mutual labels:  authorization, oidc
Oauthlib
A generic, spec-compliant, thorough implementation of the OAuth request-signing logic
Stars: ✭ 2,323 (+2223%)
Mutual labels:  authorization, oidc
Layui Authtree
扩展 layui 的权限树 authtree
Stars: ✭ 244 (+144%)
Mutual labels:  authorization
CloudDesignPatterns
Welcome to the GitHub repository of the cloud design patterns. This repository contains the examples for the Pluralsight course series: Cloud Design Patterns for Azure. You can download a copy and follow along in the course.
Stars: ✭ 96 (-4%)
Mutual labels:  azure-storage
Bouncer
Eloquent roles and abilities.
Stars: ✭ 2,763 (+2663%)
Mutual labels:  authorization
Simonsays
💂 Simple, declarative, role-based access control system for Rails and Ruby
Stars: ✭ 245 (+145%)
Mutual labels:  authorization
fedramp-tailored
FedRAMP Tailored.
Stars: ✭ 40 (-60%)
Mutual labels:  authorization
page_type languages products description urlFragment
sample
javascript
msal-js
ms-graph
azure-app-services
azure-storage
azure-key-vault
azure-functions
azure-active-directory
azure-active-directory-b2c
microsoft-identity-platform
Tutorial: Enable your JavaScript single-page application (SPA) to sign-in users and call APIs with the Microsoft identity platform
ms-identity-javascript-tutorial

Tutorial: Enable your JavaScript single-page application (SPA) to sign-in users and call APIs with the Microsoft identity platform

Build Code Scan GitHub issues npm GitHub

The Microsoft identity platform, along with Azure Active Directory (Azure AD) and Azure Azure Active Directory B2C (Azure AD B2C) are central to the Azure cloud ecosystem. This tutorial aims to take you through the fundamentals of modern authentication with JavaScript, using the Microsoft Authentication Library for JavaScript (MSAL.js).

We recommend following the chapters in successive order. However, the code samples are self-contained, so feel free to pick samples by topics that you may need at the moment.

⚠️ This is a work in progress. Come back frequently to discover more samples.

Prerequisites

Please refer to each sample's README for sample-specific prerequisites.

Recommendations

  • jwt.ms for inspecting your tokens
  • Fiddler for monitoring your network activity and troubleshooting
  • Follow the Azure AD Blog to stay up-to-date with the latest developments

Please refer to each sample's README for sample-specific recommendations.

Contents

  • For Azure AD, start the tutorial from here
  • For Azure AD B2C, start the tutorial from here

Alternatively, choose below the sample you want to review.

Chapter 1: Sign-in a user to your application

Sign-in with Azure AD
Sign-in your users with the Azure AD and learn to work with ID Tokens. Learn how single sign-on (SSO) works. Learn to secure your apps to operate in national clouds.
Sign-in with Azure AD B2C
Sign-in your customers with Azure AD B2C. Learn to integrate with external social identity providers. Learn how to use user-flows and custom policies.

Chapter 2: Sign-in a user and get an Access Token for Microsoft Graph

Get an Access Token from Azure AD and call Microsoft Graph
Authenticate your users and acquire an Access Token for Microsoft Graph and then call the Microsoft Graph API.

Chapter 3: Protect an API and call the API from your client app

Protect and call a web API on Azure AD
Protect your web API with the Azure AD. Use a client application to sign-in a user, acquire an Access Token for your web API and call your protected Web API.
Protect and call a web API on Azure AD B2C
Protect your web API with Azure AD B2C. Use a client application to sign-in a user, acquire an Access Token for your web API and call your protected web API.

Chapter 4: Call Microsoft Graph from your protected API on behalf-of a signed-in user

Call a web API that calls Microsoft Graph on behalf of a user
Enhance your protected web API to acquire an Access Token for Microsoft Graph on-behalf-of a user signed-in to the client app.
Call a web API that calls another web API with conditional access on behalf of a user
Enhance your protected web API to acquire an Access Token for another web API with MFA requirement on-behalf-of a user signed-in to the client app.

Chapter 5: Deploy your applications to Azure

Deploy to Azure Storage and App Service
Prepare your app for deployment to various Azure services. Learn how to package and upload files, configure authentication parameters and use Azure services for managing your operations.

We'd love your feedback!

Were we successful in addressing your learning objective? Consider taking a moment to share your experience with us.

More information

Learn more about the Microsoft identity platform:

See more code samples:

Community Help and Support

Use Stack Overflow to get support from the community. Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before. Make sure that your questions or comments are tagged with [ms-identity azure-ad azure-ad-b2c msal javascript].

If you find a bug in the sample, please raise the issue on GitHub Issues.

To provide a recommendation, visit the following User Voice page.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].