Blog Logo
TAGS

Tutorial: Create a React single-page app that uses auth code flow

In this tutorial, you will create a React single-page application that signs in users and calls Microsoft Graph API by using the authorization code flow with PKCE. You will use the Microsoft Authentication Library (MSAL) for React to support user sign-in and sign-out and to call Microsoft Graph API. MSAL React enables React 16+ applications to authenticate enterprise users using Azure Active Directory and also users with Microsoft accounts and social identities like Facebook, Google, and LinkedIn. This tutorial uses MSAL React, MSAL Browser, and React-Bootstrap libraries to build a simple but complete application that demonstrates the auth code flow with PKCE.