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: 4-WebApp-your-API/4-1-MyOrg/README.md
+21-13Lines changed: 21 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -38,13 +38,11 @@ Table Of Contents
38
38
1. The [Access Tokens](https://docs.microsoft.com/azure/active-directory/develop/access-tokens) is used as a bearer token to authorize the user to call the ASP.NET Core Web API protected by **Azure AD**.
39
39
40
40

41
-
42
41
## Prerequisites
43
42
44
43
* Either [Visual Studio](https://visualstudio.microsoft.com/downloads/) or [Visual Studio Code](https://code.visualstudio.com/download) and [.NET Core SDK](https://www.microsoft.com/net/learn/get-started)
45
44
* An **Azure AD** tenant. For more information, see: [How to get an Azure AD tenant](https://docs.microsoft.com/azure/active-directory/develop/test-setup-environment#get-a-test-tenant)
46
45
* A user account in your **Azure AD** tenant. This sample will not work with a **personal Microsoft account**. If you're signed in to the [Azure portal](https://portal.azure.com) with a personal Microsoft account and have not created a user account in your directory before, you will need to create one before proceeding.
47
-
48
46
## Setup the sample
49
47
50
48
### Step 1: Clone or download this repository
@@ -69,7 +67,7 @@ or download and extract the repository .zip file.
69
67
70
68
There are two projects in this sample. Each needs to be separately registered in your Azure AD tenant. To register these projects:
71
69
72
-
You can follow the [manual steps](#Manual-steps)
70
+
Follow the [manual steps](#Manual-steps)
73
71
74
72
**OR**
75
73
@@ -99,6 +97,13 @@ You can follow the [manual steps](#Manual-steps)
99
97
.\Configure.ps1 -TenantId "[Optional] - your tenant id" -Environment "[Optional] - Azure environment, defaults to 'Global'"
100
98
```
101
99
100
+
1. In case the previous script fails with error about duplicate App Registration, you might want to run the next cleanup script prior to re-running Configure.ps1
101
+
102
+
```powershell
103
+
cd .\AppCreationScripts\
104
+
.\Cleanup.ps1
105
+
```
106
+
102
107
> Other ways of running the scripts are described in [App Creation Scripts guide](./AppCreationScripts/AppCreationScripts.md)
103
108
> The scripts also provide a guide to automated application registration, configuration and removal which can help in your CI/CD scenarios.
104
109
@@ -133,8 +138,8 @@ Follow the steps below for manually register and configure your apps
133
138
* Select **Add a scope** button open the **Add a scope** screen and Enter the values as indicated below:
134
139
* For **Scope name**, use `ToDoList.Read`.
135
140
* Select **Admins and users** options for **Who can consent?**.
136
-
- For **Admin consent display name** type `Allow the app TodoListService-aspnetcore-webapi to [ex, read ToDo list items] as the signed-in user`.
137
-
- For **Admin consent description** type `Allow the application to [ex, read ToDo list items] as the signed-in user.`
141
+
- For **Admin consent display name** type `Allow the app TodoListService-aspnetcore-webapi to [ex, read ToDo list items]`.
142
+
- For **Admin consent description** type `Allow the app TodoListService-aspnetcore-webapi to [ex, read ToDo list items]`
138
143
- For **User consent display name** type `[ex, Read ToDo list items] as you`.
139
144
- For **User consent description** type `Allow the application to [ex, Read ToDo list items] as the signed-in user on your behalf.`
140
145
* Keep **State** as **Enabled**.
@@ -208,16 +213,18 @@ Follow the steps below for manually register and configure your apps
208
213
### Variation: web app using client certificates
209
214
210
215
Follow [README-use-keyvault-certificate.md](README-use-keyvault-certificate.md) to know how to use this option.
211
-
212
216
### Step 4: Running the sample
213
-
To run the samlple, run the next commands:
217
+
218
+
To run the sample, run the following commands in the console:
219
+
214
220
```console
215
221
cd 4-WebApp-Your-API\4-1-MyOrg\TodoListService
216
222
dotnet run
217
223
```
218
224
219
225
Then open a separate command line terminal and run
220
226
227
+
221
228
```console
222
229
cd 4-WebApp-Your-API\4-1-MyOrg\Client
223
230
dotnet run
@@ -530,6 +537,7 @@ Also, if you increase the instance count of the web site, requests will be distr
530
537
531
538
</details>
532
539
540
+
533
541
## Next Steps
534
542
535
543
Learn how to:
@@ -546,12 +554,12 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
546
554
547
555
## Learn More
548
556
549
-
* Microsoft identity platform (Azure Active Directory for developers)](https://docs.microsoft.com/azure/active-directory/develop/)
550
-
* Overview of Microsoft Authentication Library (MSAL)](https://docs.microsoft.com/azure/active-directory/develop/msal-overview)
551
-
* Authentication Scenarios for Azure AD](https://docs.microsoft.com/azure/active-directory/develop/authentication-flows-app-scenarios)
552
-
* Azure AD code samples](https://docs.microsoft.com/azure/active-directory/develop/sample-v2-code)
553
-
* Register an application with the Microsoft identity platform](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app)
554
-
* Building Zero Trust ready apps](https://aka.ms/ztdevsession)
557
+
* [Microsoft identity platform (Azure Active Directory for developers)](https://docs.microsoft.com/azure/active-directory/develop/)
558
+
* [Overview of Microsoft Authentication Library (MSAL)](https://docs.microsoft.com/azure/active-directory/develop/msal-overview)
559
+
* [Authentication Scenarios for Azure AD](https://docs.microsoft.com/azure/active-directory/develop/authentication-flows-app-scenarios)
560
+
* [Azure AD code samples](https://docs.microsoft.com/azure/active-directory/develop/sample-v2-code)
561
+
* [Register an application with the Microsoft identity platform](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app)
562
+
* [Building Zero Trust ready apps](https://aka.ms/ztdevsession)
0 commit comments