You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/develop/scenario-web-app-sign-user-app-registration.md
+62-63Lines changed: 62 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,114 +15,113 @@ ms.workload: identity
15
15
ms.date: 10/30/2019
16
16
ms.author: jmprieur
17
17
ms.custom: aaddev
18
-
#Customer intent: As an application developer, I want to know how to write a web app that signs-in users using the Microsoft identity platform for developers.
18
+
#Customer intent: As an application developer, I want to know how to write a web app that signsin users by using the Microsoft identity platform for developers.
19
19
ms.collection: M365-identity-device-management
20
20
---
21
21
22
-
# Web app that signs in users - app registration
22
+
# Web app that signs in users: App registration
23
23
24
-
This page explains the app registration specifics for a web app that signs-in users.
24
+
This article explains the app registration specifics for a web app that signsin users.
25
25
26
26
To register your application, you can use:
27
27
28
-
- The [web app quickstarts](#register-an-app-using-the-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. You'll need to 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 impact the sign-out URI.
29
-
- The Azure portal to [register your application manually](#register-an-app-using-azure-portal)
30
-
- PowerShell and command-line tools
28
+
- The [web app quickstarts](#register-an-app-by-using-the-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. You'll need to 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.
29
+
- The Azure portal to [register your application manually](#register-an-app-by-using-the-azure-portal).
30
+
- PowerShell and command-line tools.
31
31
32
-
## Register an app using the QuickStarts
32
+
## Register an app by using the quickstarts
33
33
34
-
If you navigate to this link, you can create bootstrap the creation of your web application:
34
+
You can use these links to bootstrap the creation of your web application:
> the portal to use is different depending on if your application runs in the Microsoft Azure public cloud or in a national or sovereign cloud. For more information, see [National Clouds](./authentication-national-cloud.md#app-registration-endpoints)
42
+
> 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](./authentication-national-cloud.md#app-registration-endpoints).
43
43
44
44
45
-
1. Sign in to the [Azure portal](https://portal.azure.com) using either a work or school account, or a personal Microsoft account. Alternatively, sign in to the national cloud Azure portal of choice.
46
-
1. If your account gives you access to more than one tenant, select your account in the top-right corner, and set your portal session to the desired Azure AD tenant.
47
-
1. In the left-hand navigation pane, select the **Azure Active Directory** service, and then select **App registrations** > **New registration**.
45
+
1. Sign in to the [Azure portal](https://portal.azure.com)by using either a work or school account, or a personal Microsoft account. Alternatively, sign in to the Azure portal of choice for the national cloud.
46
+
1. If your account gives you access to more than one tenant, select your account in the upper-right corner. Then, set your portal session to the desired Azure Active Directory (Azure AD) tenant.
47
+
1. In the left pane, select the **Azure Active Directory** service, and then select **App registrations** > **New registration**.
48
48
49
49
# [ASP.NET Core](#tab/aspnetcore)
50
50
51
-
4. When the **Register an application** page appears, enter your application's registration information:
52
-
1.choose the supported account types for your application (See [Supported Account types](./v2-supported-account-types.md))
53
-
1. In the **Name** section, enter a meaningful application name that will be displayed to users of the app, for example`AspNetCore-WebApp`.
54
-
1.In**Redirect URI**, add the type of application and the URI destination that will accept returned token responses after successfully authenticating. For example, `https://localhost:44321/`. Select**Register**.
51
+
1. When the **Register an application** page appears, enter your application's registration information:
52
+
1.Choose the supported account types for your application. (See [Supported account types](./v2-supported-account-types.md).)
53
+
1. In the **Name** section, enter a meaningful application name that will be displayed to users of the app. For example, enter **AspNetCore-WebApp**.
54
+
1.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**. Then, select**Register**.
55
55
1. Select the **Authentication** menu, and then add the following information:
56
-
1.In**Reply URL**, add `https://localhost:44321/signin-oidc` of type "Web".
57
-
1. In the **Advanced settings** section, set **Logout URL** to `https://localhost:44321/signout-oidc`.
58
-
1. Under **Implicit grant**, check**ID tokens**.
56
+
1.For**Reply URL**, add **https://localhost:44321/signin-oidc** of type **Web**.
57
+
1. In the **Advanced settings** section, set **Logout URL** to **https://localhost:44321/signout-oidc**.
58
+
1. Under **Implicit grant**, select**ID tokens**.
59
59
1. Select **Save**.
60
60
61
61
# [ASP.NET](#tab/aspnet)
62
62
63
-
4. When the **Register an application page** appears, enter your application's registration information:
64
-
1.choose the supported account types for your application (See [Supported Account types](./v2-supported-account-types.md))
65
-
- In the **Name** section, enter a meaningful application name that will be displayed to users of the app, for example`MailApp-openidconnect-v2`.
66
-
- In the Redirect URI (optional) section, select **Web** in the combo-box and enter the following redirect URIs: `https://localhost:44326/`.
63
+
1. When the **Register an application page** appears, enter your application's registration information:
64
+
1.Choose the supported account types for your application. (See [Supported account types](./v2-supported-account-types.md).)
65
+
1. In the **Name** section, enter a meaningful application name that will be displayed to users of the app. For example, enter **MailApp-openidconnect-v2**.
66
+
1. In the **Redirect URI (optional)** section, select **Web** in the combobox and enter the following redirect URI: **https://localhost:44326/**.
67
67
1. Select **Register** to create the application.
68
-
1. Select the **Authentication** menu, and then add the following information:
69
-
- In the **Advanced settings** | **Implicit grant** section, check **ID tokens** as this sample requires
70
-
the [Implicit grant flow](v2-oauth2-implicit-grant-flow.md) to be enabled to sign in the user.
68
+
1. Select the **Authentication** menu.
69
+
1. In the **Advanced settings** | **Implicit grant** section, select **ID tokens**. This sample requires the [implicit grant flow](v2-oauth2-implicit-grant-flow.md) to be enabled to sign in the user.
71
70
1. Select **Save**.
72
71
73
72
# [Java](#tab/java)
74
73
75
-
4. When the **Register an application page** appears, enter a friendly name for the application, for example 'java-webapp', select "Accounts in any organizational directory
76
-
and personal Microsoft Accounts (e.g. Skype, Xbox, Outlook.com)"
77
-
and select 'Web app / API' as the *Application Type*.
78
-
1. Click **Register** to register the application.
79
-
1. On the left-hand menu, click on **Authentication**, and under *Redirect URIs*, select "Web". You will need to enter
80
-
two different redirect URIs: one for the signIn page, and one for the graph page. For both, you should use the same host and port number, then followed by "/msal4jsample/secure/aad" for the sign-in page and "msal4jsample/graph/me" for the user info page.
81
-
By default, the sample uses:
74
+
1. When the **Register an application page** appears, enter a display name for the application. For example, enter **java-webapp**.
75
+
1. Select **Accounts in any organizational directory
76
+
and personal Microsoft Accounts (e.g. Skype, Xbox, Outlook.com)**,
77
+
and then select **Web app / API** for **Application Type**.
78
+
1. Select **Register** to register the application.
79
+
1. On the left menu, select **Authentication**. Under **Redirect URIs**, select **Web**.
1. Enter two redirect URIs: one for the sign-in page, and one for the graph page. For both, use the same host and port number, followed by **/msal4jsample/secure/aad** for the sign-in page and **msal4jsample/graph/me** for the user information page.
82
+
83
+
By default, the sample uses:
85
84
86
-
In the **Advanced settings** section, set **Logout URL** to `http://localhost:8080/msal4jsample/sign_out`.
1. In the **Advanced settings** section, set**Logout URL** to **http://localhost:8080/msal4jsample/sign_out**. Then, select **Save**.
89
89
90
-
1. Select the **Certificates & secrets** from the menu and in the **Client secrets** section, click on **New client secret**:
90
+
1. Select **Certificates & secrets** from the menu.
91
+
1. In the **Client secrets** section, select **New client secret**, and then:
91
92
92
-
- Type a key description
93
-
-Select a key duration **In 1 year**.
94
-
- The key value will display when you select**Add**.
95
-
- Copy the value of the key for later. This key value will not be displayed again, nor retrievable by any other means, so record it as soon as it is visible from the Azure portal.
93
+
1. Enter a key description.
94
+
1.Select the key duration **In 1 year**.
95
+
1. Select**Add**.
96
+
1. When the key value appears, copy it for later. This value will not be displayed again or be retrievable by any other means.
96
97
97
98
# [Python](#tab/python)
98
99
99
-
4. When the **Register an application page** appears, enter your application's registration information:
100
-
- In the **Name** section, enter a meaningful application name that will be displayed to users of the app, for example`python-webapp`.
101
-
- Change **Supported account types** to **Accounts in any organizational directory and personal Microsoft accounts (e.g. Skype, Xbox, Outlook.com)**.
102
-
- In the Redirect URI (optional) section, select **Web** in the combo-box and enter the following redirect URIs: `http://localhost:5000/getAToken`.
100
+
1. When the **Register an application page** appears, enter your application's registration information:
101
+
1. In the **Name** section, enter a meaningful application name that will be displayed to users of the app. For example, enter **python-webapp**.
102
+
1. Change **Supported account types** to **Accounts in any organizational directory and personal Microsoft accounts (e.g. Skype, Xbox, Outlook.com)**.
103
+
1. In the **Redirect URI (optional)** section, select **Web** in the combobox and enter the following redirect URI: **http://localhost:5000/getAToken**.
103
104
1. Select **Register** to create the application.
104
-
1. On the app **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.
105
-
1. From the app's Overview page, select the **Authentication** section.
106
-
- In the **Advanced settings** section set **Logout URL** to `http://localhost:5000/logout`
107
-
108
-
Select **Save**.
109
-
1. On the left hand menu, choose **Certificates & secrets** and click on **New client secret** in the **Client Secrets** section:
110
-
111
-
- Type a key description
112
-
- Select a key duration of **In 1 year**.
113
-
- When you click on **Add**, the key value will be displayed.
114
-
- Copy the value of the key. You will need it later.
105
+
1. 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.
106
+
1. Select the **Authentication** section. In **Advanced settings**, set **Logout URL** to **http://localhost:5000/logout**. Then, select **Save**.
107
+
1. On the left menu, select **Certificates & secrets**.
108
+
1. In the **Client Secrets** section, select **New client secret**, and then:
109
+
110
+
1. Enter a key description.
111
+
1. Select a key duration of **In 1 year**.
112
+
1. Select **Add**.
113
+
1. When the key value appears, copy it. You'll need it later.
115
114
---
116
115
117
-
## Register an app using PowerShell
116
+
## Register an app by using PowerShell
118
117
119
118
> [!NOTE]
120
-
> Currently Azure AD PowerShell only creates applications with the following supported account types:
119
+
> Currently, Azure AD PowerShell creates applications with only the following supported account types:
121
120
>
122
-
> - MyOrg (Accounts in this organizational directory only)
123
-
> - AnyOrg (Accounts in any organizational directory).
121
+
> - MyOrg (accounts in this organizational directory only)
122
+
> - AnyOrg (accounts in any organizational directory)
124
123
>
125
-
> If you want to create an application that signs-in users with their personal Microsoft Accounts (e.g. Skype, XBox, Outlook.com), you can first create a multi-tenant application (Supported account types = Accounts in any organizational directory), and then change the `signInAudience` property in the application manifest from the Azure portal. This is explained in details in the step [1.3](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/1-WebApp-OIDC/1-3-AnyOrgOrPersonal#step-1-register-the-sample-with-your-azure-ad-tenant)of the ASP.NET Core tutorial (and can be generalized to web apps in any language).
124
+
> You can create an application that signsin 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 `signInAudience` property in the application manifest from the Azure portal. For more information, see [step 1.3](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/1-WebApp-OIDC/1-3-AnyOrgOrPersonal#step-1-register-the-sample-with-your-azure-ad-tenant)in the ASP.NET Core tutorial. You can generalize this step to web apps in any language.
0 commit comments