Skip to content

Commit 5a91680

Browse files
committed
Update readme.md
1 parent fbb508e commit 5a91680

File tree

1 file changed

+22
-34
lines changed

1 file changed

+22
-34
lines changed

README.md

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,53 +17,41 @@ For more information about how the protocols work in this scenario and other sce
1717
To run this sample you will need:
1818
- Visual Studio 2013
1919
- An Internet connection
20-
- An Azure subscription (a free trial is sufficient)
21-
22-
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.
20+
- 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/)
21+
- 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.
2322

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

2625
From your shell or command line:
2726

2827
`git clone https://github.com/Azure-Samples/active-directory-dotnet-webapi-manual-jwt-validation.git`
2928

30-
### Step 2: Create a user account in your Azure Active Directory tenant
31-
32-
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.
33-
34-
### Step 3: Register the sample with your Azure Active Directory tenant
29+
### Step 2: Register the sample with your Azure Active Directory tenant
3530

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

3833
#### Register the TodoListService-ManualJwt web API
3934

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

5243
#### Register the TodoListClient app
5344

54-
1. Sign in to the [Azure management portal](https://manage.windowsazure.com).
55-
2. Click on Active Directory in the left hand nav.
56-
3. Click the directory tenant where you wish to register the sample application.
57-
4. Click the Applications tab.
58-
5. In the drawer, click Add.
59-
6. Click "Add an application my organization is developing".
60-
7. Enter a friendly name for the application, for example "TodoListClient-DotNet", select "Native Client Application", and click next.
61-
8. For the Redirect URI, enter `http://TodoListClient`. Click finish.
62-
9. Click the Configure tab of the application.
63-
10. Find the Client ID value and copy it aside, you will need this later when configuring your application.
64-
11. 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.
45+
1. Sign in to the [Azure portal](https://portal.azure.com).
46+
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.
47+
3. Click on **More Services** in the left hand nav, and choose **Azure Active Directory**.
48+
4. Click on **App registrations** and choose **Add**.
49+
5. Enter a friendly name for the application, for example 'TodoListClient-DotNet' and select 'Native' as the Application Type. For the redirect URI, enter `https://TodoListClient`. Click on **Create** to create the application.
50+
6. While still in the Azure portal, choose your application, click on **Settings** and choose **Properties**.
51+
7. Find the Application ID value and copy it to the clipboard.
52+
8. 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'.
6553

66-
### Step 4: Configure the sample to use your Azure AD tenant
54+
### Step 3: Configure the sample to use your Azure AD tenant
6755

6856
#### Configure the TodoListService-ManualJwt project
6957

@@ -81,7 +69,7 @@ There are two projects in this sample. Each needs to be separately registered i
8169
5. Find the app key `todo:TodoListResourceId` and replace the value with the App ID URI of the TodoListService-ManualJwt project, for example `https://<your_tenant_name>/TodoListService-ManualJwt`
8270
6. Find the app key `todo:TodoListBaseAddress` and replace the value with the base address of the TodoListService-ManualJwt project, for example `https://localhost:44324`.
8371

84-
### Step 5: Trust the IIS Express SSL certificate
72+
### Step 4: Trust the IIS Express SSL certificate
8573

8674
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-ManualJwt web API will always throw an unhandled exception where the inner exception message is:
8775

@@ -117,7 +105,7 @@ You can verify the certificate is in the Trusted Root store by running this comm
117105

118106
`PS C:\windows\system32> dir Cert:\LocalMachine\Root`
119107

120-
### Step 6: Run the sample
108+
### Step 5: Run the sample
121109

122110
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.
123111

@@ -160,4 +148,4 @@ First, in Visual Studio 2013 create an empty solution to host the projects. Th
160148
8. Copy the code from `MainWindow.xaml.cs` in the sample project into the file of same name in the new project, completely replacing the code in the file in the new project.
161149
9. In `app.config` create keys for `ida:AADInstance`, `ida:Tenant`, `ida:ClientId`, `ida:RedirectUri`, `todo:TodoListResourceId`, and `todo:TodoListBaseAddress` and set them accordingly. For the public Azure cloud, the value of `ida:AADInstance` is `https://login.windows.net/{0}`.
162150

163-
Finally, in the properties of the solution itself, set both projects as startup projects.
151+
Finally, in the properties of the solution itself, set both projects as startup projects.

0 commit comments

Comments
 (0)