This article explains the app registration steps for a web app that signs in users.
To register your application, you can use:
The web app quickstarts. In addition to being a great first experience with creating an application, quickstarts in the Azure portal contain a button named Make this change for me. You can use this button to set the properties you need, even for an existing app. Adapt the values of these properties to your own case. In particular, the web API URL for your app is probably going to be different from the proposed default, which will also affect the sign-out URI.
The portal to use is different depending on whether your application runs in the Microsoft Azure public cloud or in a national or sovereign cloud. For more information, see National clouds.
If you have access to multiple tenants, use the Directories + subscriptions filter
in the top menu to switch to the tenant in which you want to register the application.
Search for and select Azure Active Directory.
Under Manage, select App registrations > New registration.
For Redirect URI, add the type of application and the URI destination that will accept returned token responses after successful authentication. For example, enter https://localhost:44321.
Select Register.
Under Manage, select Authentication and then add the following information:
In the Web section, add https://localhost:44321/signin-oidc as a Redirect URI.
In Front-channel logout URL, enter https://localhost:44321/signout-oidc.
Under Implicit grant and hybrid flows, select ID tokens.
Select Save.
When the Register an application page appears, enter your application's registration information:
Enter a Name for your application, for example MailApp-openidconnect-v2. Users of your app might see this name, and you can change it later.
In the Redirect URI (optional) section, select Web in the combo box and enter a Redirect URI of https://localhost:44326/.
Select Register to create the application.
Under Manage, select Authentication.
In the Implicit grant and hybrid flows section, select ID tokens. This sample requires the implicit grant flow to be enabled to sign in the user.
Select Save.
When the Register an application page appears, enter your application's registration information:
Enter a Name for your application, for example java-webapp. Users of your app might see this name, and you can change it later.
Select Accounts in any organizational directory and personal Microsoft Accounts (e.g. Skype, Xbox, Outlook.com).
Select Register to register the application.
Under Manage, select Authentication > Add a platform.
Select Web.
For Redirect URI, enter the same host and port number, followed by /msal4jsample/secure/aad for the sign-in page.
Select Configure.
In the Web section, use the host and port number, followed by /msal4jsample/graph/me as a Redirect URI for the user information page.
By default, the sample uses:
http://localhost:8080/msal4jsample/secure/aad
http://localhost:8080/msal4jsample/graph/me
Select Save.
Under Manage, select Certificates & secrets.
In the Client secrets section, select New client secret, and then:
Enter a key description.
Select the key duration In 1 year.
Select Add.
When the key value appears, copy it for later. This value will not be displayed again or be retrievable by any other means.
When the Register an application page appears, enter your application's registration information:
Enter a Name for your application, for example node-webapp. Users of your app might see this name, and you can change it later.
Change Supported account types to Accounts in this organizational directory only.
In the Redirect URI (optional) section, select Web in the combo box and enter the following redirect URI: http://localhost:3000/auth/redirect.
Select Register to create the application.
On the app's Overview page, find the Application (client) ID value and record it for later. You'll need it to configure the configuration file for this project.
Under Manage, select Certificates & secrets.
In the Client Secrets section, select New client secret, and then:
Enter a key description.
Select a key duration of In 1 year.
Select Add.
When the key value appears, copy it. You'll need it later.
When the Register an application page appears, enter your application's registration information:
Enter a Name for your application, for example python-webapp. Users of your app might see this name, and you can change it later.
Change Supported account types to Accounts in any organizational directory and personal Microsoft accounts (e.g. Skype, Xbox, Outlook.com).
In the Redirect URI (optional) section, select Web in the combo box and enter the following redirect URI: http://localhost:5000/getAToken.
Select Register to create the application.
On the app's Overview page, find the Application (client) ID value and record it for later. You'll need it to configure the Visual Studio configuration file for this project.
Under Manage, select Certificates & secrets.
In the Client Secrets section, select New client secret, and then:
Enter a key description.
Select a key duration of In 1 year.
Select Add.
When the key value appears, copy it. You'll need it later.
Register an app by using PowerShell
Note
Currently, Azure AD PowerShell creates applications with only the following supported account types:
MyOrg (accounts in this organizational directory only)
AnyOrg (accounts in any organizational directory)
You can create an application that signs in users with their personal Microsoft accounts (for example, Skype, Xbox, or Outlook.com). First, create a multitenant application. Supported account types are accounts in any organizational directory. Then, change the accessTokenAcceptedVersion property to 2 and the signInAudience property to AzureADandPersonalMicrosoftAccount in the application manifest from the Azure portal. For more information, see step 1.3 in the ASP.NET Core tutorial. You can generalize this step to web apps in any language.