Skip to content

Commit fbb508e

Browse files
committed
Revert to old portal instructions for API samples
1 parent 285e90d commit fbb508e

File tree

1 file changed

+33
-21
lines changed

1 file changed

+33
-21
lines changed

README.md

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,53 @@ 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 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.
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.
2223

2324
### Step 1: Clone or download this repository
2425

2526
From your shell or command line:
2627

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

29-
### Step 2: Register the sample with your Azure Active Directory tenant
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
3035

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

3338
#### Register the TodoListService-ManualJwt web API
3439

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`. 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.
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.
4251

4352
#### Register the TodoListClient app
4453

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'.
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.
5365

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

5668
#### Configure the TodoListService-ManualJwt project
5769

@@ -69,7 +81,7 @@ There are two projects in this sample. Each needs to be separately registered i
6981
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`
7082
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`.
7183

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

7486
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:
7587

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

106118
`PS C:\windows\system32> dir Cert:\LocalMachine\Root`
107119

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

110122
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.
111123

0 commit comments

Comments
 (0)