Skip to content
This repository was archived by the owner on Jan 23, 2020. It is now read-only.

Commit 816c426

Browse files
committed
Update readme.md
1 parent 8ddddb3 commit 816c426

File tree

1 file changed

+25
-40
lines changed

1 file changed

+25
-40
lines changed

README.md

Lines changed: 25 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -16,58 +16,43 @@ For more information about how the protocols work in this scenario and other sce
1616
Getting started is simple! To run this sample you will need:
1717
- Install .NET Core for Windows by following the instructions at [dot.net/core](https://dot.net/core), which will include Visual Studio 2015 Update 3.
1818
- An Internet connection
19-
- An Azure subscription (a free trial is sufficient)
20-
21-
Every Azure subscription has an associated Azure Active Directory tenant. If you don't already have an Azure subscription, you can get a free subscription by signing up at [https://azure.microsoft.com](https://azure.microsoft.com). All of the Azure AD features used by this sample are available free of charge.
19+
- An Azure Active Directory (Azure AD) tenant. For more information on how to get an Azure AD tenant, please see [How to get an Azure AD tenant](https://azure.microsoft.com/en-us/documentation/articles/active-directory-howto-tenant/)
20+
- A user account in your Azure AD tenant. This sample will not work with a Microsoft account, so if you signed in to the Azure portal with a Microsoft account and have never created a user account in your directory before, you need to do that now.
2221

2322
### Step 1: Clone or download this repository
2423

2524
From your shell or command line:
2625

2726
`git clone https://github.com/Azure-Samples/active-directory-dotnet-webapp-webapi-openidconnect-aspnetcore.git`
2827

29-
### Step 2: Create a user account in your Azure Active Directory tenant
30-
31-
If you already have a user account in your Azure Active Directory tenant, you can skip to the next step. This sample will not work with a Microsoft account, so if you signed in to the Azure portal with a Microsoft account and have never created a user account in your directory before, you need to do that now. If you create an account and want to use it to sign-in to the Azure portal, don't forget to add the user account as a co-administrator of your Azure subscription.
32-
33-
### Step 3: Register the sample with your Azure Active Directory tenant
28+
### Step 2: Register the sample with your Azure Active Directory tenant
3429

3530
There are two projects in this sample. Each needs to be separately registered in your Azure AD tenant.
3631

3732
#### Register the TodoListService web API
3833

39-
1. Sign in to the [Azure management portal](https://manage.windowsazure.com).
40-
2. Click on Active Directory in the left hand nav.
41-
3. Click the directory tenant where you wish to register the sample application.
42-
4. Click the Applications tab.
43-
5. In the drawer, click Add.
44-
6. Click "Add an application my organization is developing".
45-
7. Enter a friendly name for the application, for example "TodoListService", select "Web Application and/or Web API", and click next.
46-
8. For the sign-on URL, enter the base URL for the sample, which is by default `https://localhost:44351`.
47-
9. For the App ID URI, enter `https://<your_tenant_name>/TodoListService`, replacing `<your_tenant_name>` with the name of your Azure AD tenant. Click OK to complete the registration.
48-
10. While still in the Azure portal, click the Configure tab of your application.
49-
11. Find the Client ID value and copy it aside, you will need this later when configuring your application.
34+
1. Sign in to the [Azure portal](https://portal.azure.com).
35+
2. On the top bar, click on your account and under the **Directory** list, choose the Active Directory tenant where you wish to register your application.
36+
3. Click on **More Services** in the left hand nav, and choose **Azure Active Directory**.
37+
4. Click on **App registrations** and choose **Add**.
38+
5. Enter a friendly name for the application, for example 'TodoListService' and select 'Web Application and/or Web API' as the Application Type. For the sign-on URL, enter the base URL for the sample, which is by default `https://localhost:44351`. For the App ID URI, enter https://<your_tenant_name>/TodoListService, replacing <your_tenant_name> with the name of your Azure AD tenant. Click on **Create** to create the application.
39+
6. While still in the Azure portal, choose your application, click on **Settings** and choose **Properties**.
40+
7. Find the Application ID value and copy it to the clipboard.
5041

5142
#### Register the TodoListWebApp web application
5243

53-
1. Sign in to the [Azure management portal](https://manage.windowsazure.com).
54-
2. Click on Active Directory in the left hand nav.
55-
3. Click the directory tenant where you wish to register the sample application.
56-
4. Click the Applications tab.
57-
5. In the drawer, click Add.
58-
6. Click "Add an application my organization is developing".
59-
7. Enter a friendly name for the application, for example "TodoListWebApp", select "Web Application and/or Web API", and click next.
60-
8. For the sign-on URL, enter the base URL for the sample, which is by default `https://localhost:44371/signin-oidc`.
61-
9. For the App ID URI, enter `https://<your_tenant_name>/TodoListWebApp`, replacing `<your_tenant_name>` with the name of your Azure AD tenant. Click OK to complete the registration.
62-
1. While still in the Azure portal, click the **Configure** tab of your application.
63-
2. Locate the **Manage Manifest** button in the bottom drawer. Click it and download your application's manifest as a `.json` file.
64-
3. Open the `.json` file in a text editor and change the `logoutUrl` property to `https://localhost:44371/Account/EndSession`. This is the default single sign out URL for this sample.
65-
4. Back in the Azure portal, click **Manage Manifest** then **Upload Manifest**, and upload your updated `.json` file.
66-
5. Finally, locate the **Client ID** value in the **Configure** tab and copy it to your clipboard. You will need it shortly.
67-
12. Create a new key for the application. Save the configuration so you can view the key value. Save this aside for when you configure the project in Visual Studio.
68-
13. In "Permissions to Other Applications", click "Add Application." Select "Other" in the "Show" dropdown, and click the upper check mark. Locate & click on the TodoListService, and click the bottom check mark to add the application. Select "Access TodoListService" from the "Delegated Permissions" dropdown, and save the configuration.
69-
70-
### Step 4: Configure the sample to use your Azure AD tenant
44+
1. Sign in to the [Azure portal](https://portal.azure.com).
45+
2. On the top bar, click on your account and under the **Directory** list, choose the Active Directory tenant where you wish to register your application.
46+
3. Click on **More Services** in the left hand nav, and choose **Azure Active Directory**.
47+
4. Click on **App registrations** and choose **Add**.
48+
5. Enter a friendly name for the application, for example 'TodoListWebApp' and select 'Web Application and/or Web API' as the Application Type. For the sign-on URL, enter the base URL for the sample, which is by default `https://localhost:44371/signin-oidc`.
49+
6. While still in the Azure portal, choose your application, click on **Settings** and choose **Properties**.
50+
7. Find the Application ID value and copy it to the clipboard.
51+
8. On the same page, change the `Logout Url` property to `https://localhost:44371/Account/EndSession`. This is the default single sign out URL for this sample.
52+
9. From the Settings menu, choose **Keys** and add a key - select a key duration of either 1 year or 2 years. When you save this page, the key value will be displayed, copy and save the value in a safe location - you will need this key later to configure the project in Visual Studio - this key value will not be displayed again, nor retrievable by any other means, so please record it as soon as it is visible from the Azure Portal.
53+
10. Configure Permissions for your application - in the Settings menu, choose the 'Required permissions' section, click on **Add**, then **Select an API**, and type 'TodoListService' in the textbox. Then, click on **Select Permissions** and select 'Access TodoListService'.
54+
55+
### Step 3: Configure the sample to use your Azure AD tenant
7156

7257
#### Configure the TodoListService project
7358

@@ -86,7 +71,7 @@ There are two projects in this sample. Each needs to be separately registered i
8671
6. If you changed the base URL of the TodoListWebApp sample, find the `PostLogoutRedirectUri` property and replace the value with the new base URL of the sample.
8772
8. Find the `TodoListResourceId` property and replace the value with the App ID URI registered for the TodoListService, for example `https://<your_tenant_name>/TodoListService`.
8873

89-
### Step 5: Trust the IIS Express SSL certificate
74+
### Step 4: Trust the IIS Express SSL certificate
9075

9176
Since the web API is SSL protected, the client of the API (the web app) will refuse the SSL connection to the web API unless it trusts the API's SSL certificate. Use the following steps in Windows Powershell to trust the IIS Express SSL certificate. You only need to do this once. If you fail to do this step, calls to the TodoListService will always throw an unhandled exception where the inner exception message is:
9277

@@ -122,8 +107,8 @@ You can verify the certificate is in the Trusted Root store by running this comm
122107

123108
`PS C:\windows\system32> dir Cert:\LocalMachine\Root`
124109

125-
### Step 6: Run the sample
110+
### Step 5: Run the sample
126111

127112
Clean the solution, rebuild the solution, and run it. You might want to go into the solution properties and set both projects as startup projects, with the service project starting first.
128113

129-
Explore the sample by signing in, To Do List link, adding items to the To Do list, signing out, and starting again.
114+
Explore the sample by signing in, To Do List link, adding items to the To Do list, signing out, and starting again.

0 commit comments

Comments
 (0)