To interact with the Microsoft identity platform, Azure Active Directory (Azure AD) must be made aware of the application you create. This tutorial shows you how to register a single-page application (SPA) in a tenant on the Azure portal.
In this tutorial:
- Register the application in a tenant
- Add a Redirect URI to the application
- Record the application's unique identifiers
- An Azure account with an active subscription. Create an account for free.
- This Azure account must have permissions to manage applications. Any of the following Azure AD roles include the required permissions:
- Application administrator
- Application developer
- Cloud application administrator
Register the application and record identifiers
To complete registration, provide the application a name, specify the supported account types, and add a redirect URI. Once registered, the application Overview pane displays the identifiers needed in the application source code.
Sign in to the Azure portal.
If access to multiple tenants is available, use the Directories + subscriptions filter in the top menu to switch to the tenant in which to register the application.
Search for and select Azure Active Directory.
Under Manage, select App registrations > New registration.
Enter a Name for the application, such as NewSPA1.
For Supported account types, select Accounts in this organizational directory only. For information on different account types, select the Help me choose option.
Under Redirect URI (optional), use the drop-down menu to select Single-page-application (SPA) and enter
http://localhost:3000into the text box.
9. The application's Overview pane is displayed when registration is complete. Record the Directory (tenant) ID and the Application (client) ID to be used in your application source code.
Note: The Supported account types can be changed by referring to Modify the accounts supported by an application.