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: 2-WebApp-graph-user/2-3-Multi-Tenant/README.md
+7-21Lines changed: 7 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ endpoint: Microsoft identity platform
10
10
11
11
# An ASP.NET Core Web app signing-in users in any org with the Microsoft identity platform
12
12
13
-
> This sample is for Azure AD, not Azure AD B2C. See [active-directory-b2c-dotnetcore-webapp](https://github.com/Azure-Samples/active-directory-b2c-dotnetcore-webapp), until we incorporate the B2C variation in the tutorial.
@@ -20,9 +20,6 @@ This sample shows how to build a .NET Core MVC Web app that uses OpenID Connect
20
20
21
21

22
22
23
-
> This is the second chapter of the first phase of this ASP.NET Core Web App tutorial. Once you understand how to sign-in users in an ASP.NET Core Web App with Open Id Connect, you can learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2-WebApp-graph-user) in a later chapter.
24
-
> You can also sign-in users in your own Azure Active Directory organizations, and even with Microsoft personal accounts or social identities. For more details the parent directory's [Readme.md](../README.md)
25
-
26
23
## How to run this sample
27
24
28
25
To run this sample:
@@ -37,7 +34,7 @@ From your shell or command line:
@@ -89,12 +86,12 @@ As a first step you'll need to:
89
86
1. If your account is present in more than one Azure AD tenant, select your profile at the top right corner in the menu on top of the page, and then **switch directory**.
90
87
Change your portal session to the desired Azure AD tenant.
91
88
92
-
#### Register the client app (WebApp)
89
+
#### Register the web app (WebApp-MultiTenant-v2)
93
90
94
91
1. Navigate to the Microsoft identity platform for developers [App registrations](https://go.microsoft.com/fwlink/?linkid=2083908) page.
95
92
1. Click **New registration** on top.
96
93
1. In the **Register an application page** that appears, enter your application's registration information:
97
-
- In the **Name** section, enter a meaningful application name that will be displayed to users of the app, for example `WebApp`.
94
+
- In the **Name** section, enter a meaningful application name that will be displayed to users of the app, for example `WebApp-MultiTenant-v2`.
98
95
- Change **Supported account types** to **Accounts in any organizational directory**.
99
96
> Note that there are more than one redirect URIs used in this sample. You'll need to add them from the **Authentication** tab later after the app has been created successfully.
100
97
1. Click on the **Register** button in bottom to create the application.
@@ -120,16 +117,16 @@ As a first step you'll need to:
120
117
- In the **Delegated permissions** section, select the **Directory.Read.All** in the list. Use the search box if necessary.
121
118
- Click on the **Add permissions** button in the bottom.
122
119
123
-
##### Configure the project (WebApp) to use your app registration
120
+
##### Configure the project (WebApp-OpenIDConnect-DotNet) to use your app registration
124
121
125
122
Open the project in your IDE (like Visual Studio) to configure the code.
126
123
>In the steps below, "ClientID" is the same as "Application ID" or "AppId".
127
124
128
125
1. Open the `appsettings.json` file
129
-
1. Find the app key `ClientId` and replace the existing value with the application ID (clientId) of the `WebApp` application copied from the Azure portal.
126
+
1. Find the app key `ClientId` and replace the existing value with the application ID (clientId) of the `WebApp-MultiTenant-v2` application copied from the Azure portal.
130
127
1. Find the app key `TenantId` and replace the existing value with `organizations`.
131
128
1. Find the app key `Domain` and replace the existing value with your Azure AD tenant name.
132
-
1. Find the app key `ClientSecret` and replace the existing value with the key you saved during the creation of the `WebApp` app, in the Azure portal.
129
+
1. Find the app key `ClientSecret` and replace the existing value with the key you saved during the creation of the `WebApp-MultiTenant-v2` app, in the Azure portal.
133
130
134
131
### Step 4: Run the sample
135
132
@@ -280,14 +277,6 @@ If you'd like to contribute to this sample, see [CONTRIBUTING.MD](/CONTRIBUTING.
280
277
281
278
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
282
279
283
-
## Next steps
284
-
285
-
Learn how to:
286
-
287
-
- Change your web app to sign-in users with [any Microsoft accounts](../1-3-AnyOrgOrPersonal/README-1-1-to-1-3.md)
288
-
- Enable users from [National clouds](../1-4-Sovereign) to sign-in to your application
289
-
- enable your [Web App to call a Web API on behalf of the signed-in user](../../2-WebApp-graph-user)
@@ -296,6 +285,3 @@ To understand more about app registration, see:
296
285
297
286
-[Quickstart: Register an application with the Microsoft identity platform (Preview)](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app)
298
287
-[Quickstart: Configure a client application to access web APIs (Preview)](https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-access-web-apis)
299
-
300
-
## Previous steps
301
-
- enable [your organization](../1-1-MyOrg) only to sign-in to your web app.
0 commit comments