Skip to content

Commit ca5ce80

Browse files
committed
copyedits
1 parent 38d341c commit ca5ce80

File tree

3 files changed

+13
-19
lines changed

3 files changed

+13
-19
lines changed

articles/api-management/api-management-howto-oauth2.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,10 @@ Throughout this tutorial you'll be asked to record key information to reference
9898

9999
You'll need to register two applications with your OAuth 2.0 provider: one represents the backend API to be protected, and a second represents the client application that calls the API - in this case, the test console of the developer portal.
100100

101-
The following are example steps using Azure AD as the OAuth 2.0 provider.
101+
The following are example steps using Azure AD as the OAuth 2.0 provider. For details about app registration, see [Quickstart: Configure an application to expose a web API](../active-directory/develop/quickstart-configure-app-expose-web-apis.md).
102102

103103
### Register an application in Azure AD to represent the API
104104

105-
Using the Azure portal, register an application that represents the backend API in Azure AD.
106-
107-
For details about app registration, see [Quickstart: Configure an application to expose a web API](../active-directory/develop/quickstart-configure-app-expose-web-apis.md).
108-
109105
1. In the [Azure portal](https://portal.azure.com), search for and select **App registrations**.
110106

111107
1. Select **New registration**.
@@ -137,9 +133,7 @@ For details about app registration, see [Quickstart: Configure an application to
137133

138134
### Register another application in Azure AD to represent a client application
139135

140-
Register every client application that calls the API as an application in Azure AD. In this example, the client application is the **test console** in the API Management developer portal.
141-
142-
To register an application in Azure AD to represent the client application:
136+
Register every client application that calls the API as an application in Azure AD.
143137

144138
1. In the [Azure portal](https://portal.azure.com), search for and select **App registrations**.
145139

@@ -248,18 +242,18 @@ Optionally:
248242

249243
- `/signin-oauth/code/callback/{authServerName}` for authorization code grant flow
250244
- `/signin-oauth/implicit/callback` for implicit grant flow
251-
252-
Copy the appropriate Redirect URI to the **Authentication** page of your client-app registration. In the app registration, select **Authentication** > **+ Add a platform** > **Web**, and then enter the Redirect URI.
253245

254246
:::image type="content" source="media/api-management-howto-oauth2/oauth-04.png" alt-text="Add client credentials for the OAuth 2.0 service":::
255247

248+
Copy the appropriate Redirect URI to the **Authentication** page of your client-app registration. In the app registration, select **Authentication** > **+ Add a platform** > **Web**, and then enter the Redirect URI.
249+
256250
1. If **Authorization grant types** is set to **Resource owner password**, the **Resource owner password credentials** section is used to specify those credentials; otherwise you can leave it blank.
257251

258252
1. Select **Create** to save the API Management OAuth 2.0 authorization server configuration.
259253

260254
1. [Republish](api-management-howto-developer-portal-customize.md#publish) the developer portal.
261255

262-
> [!NOTE]
256+
> [!IMPORTANT]
263257
> When making OAuth 2.0-related changes, be sure to to republish the developer portal after every modification as relevant changes (for example, scope change) otherwise cannot propagate into the portal and subsequently be used in trying out the APIs.
264258
265259
After saving the OAuth 2.0 server configuration, configure an API or APIs to use this configuration, as shown in the next section.
@@ -274,17 +268,18 @@ After saving the OAuth 2.0 server configuration, configure an API or APIs to use
274268

275269
:::image type="content" source="./media/api-management-howto-oauth2/oauth-07.png" alt-text="Configure OAuth 2.0 authorization server":::
276270

271+
## Developer portal - test the OAuth 2.0 user authorization
272+
273+
[!INCLUDE [api-management-test-oauth-authorization](../../includes/api-management-test-oauth-authorization.md)]
274+
277275
## Configure a JWT validation policy to pre-authorize requests
278276

279-
In the preceding section, API Management doesn't validate the access token. It only passes the token in the authorization header to the backend API.
277+
In the configuration so far, API Management doesn't validate the access token. It only passes the token in the authorization header to the backend API.
280278

281279
To pre-authorize requests, configure a [validate-jwt](api-management-access-restriction-policies.md#ValidateJWT) policy to validate the access token of each incoming request. If a request doesn't have a valid token, API Management blocks it.
282280

283281
[!INCLUDE [api-management-configure-validate-jwt](../../includes/api-management-configure-validate-jwt.md)]
284282

285-
## Developer portal - test the OAuth 2.0 user authorization
286-
287-
[!INCLUDE [api-management-test-oauth-authorization](../../includes/api-management-test-oauth-authorization.md)]
288283

289284
## Legacy developer portal - test the OAuth 2.0 user authorization
290285

@@ -316,7 +311,6 @@ Once you've signed in, the **Request headers** are populated with an `Authorizat
316311

317312
At this point you can configure the desired values for the remaining parameters, and submit the request.
318313

319-
320314
## Next steps
321315

322316
For more information about using OAuth 2.0 and API Management, see [Protect a web API backend in Azure API Management using OAuth 2.0 authorization with Azure Active Directory](api-management-howto-protect-backend-with-aad.md).

includes/api-management-configure-validate-jwt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.author: danlep
88

99
The following example policy, when added to the `<inbound>` policy section, checks the value of the audience claim in an access token obtained from Azure AD that is presented in the Authorization header. It returns an error message if the token is not valid. Configure this policy at a policy scope that's appropriate for your scenario.
1010

11-
* In `openid-config`, the `aad-tenant` is the tenant ID in Azure AD. Find this value in the Azure portal, for example, on the **Overview** page of your Azure AD resource. The example shown assumes a single-tenant Azure AD app and a v2 configuration endpoint.
11+
* In the `openid-config` URL, the `aad-tenant` is the tenant ID in Azure AD. Find this value in the Azure portal, for example, on the **Overview** page of your Azure AD resource. The example shown assumes a single-tenant Azure AD app and a v2 configuration endpoint.
1212
* The value of the `claim` is the client ID of the backend-app you registered in Azure AD.
1313

1414

@@ -24,6 +24,6 @@ The following example policy, when added to the `<inbound>` policy section, chec
2424
```
2525

2626
> [!NOTE]
27-
> The preceding `openid-config` URL corresponds to the v2 endpoint. For the v1 `openid-config`endpoint, use `https://login.microsoftonline.com/{aad-tenant}/.well-known/openid-configuration`.
27+
> The preceding `openid-config` URL corresponds to the v2 endpoint. For the v1 `openid-config` endpoint, use `https://login.microsoftonline.com/{aad-tenant}/.well-known/openid-configuration`.
2828
2929
For information on how to configure policies, see [Set or edit policies](../articles/api-management/set-edit-policies.md).

includes/api-management-test-oauth-authorization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ Once you've configured your OAuth 2.0 authorization server and configured your A
3232
Authorization: Bearer eyJ0eXAiOi[...]3pkCfvEOyA
3333
```
3434

35-
1. Select **Send** to call the API successfully.
35+
1. Configure the desired values for the remaining parameters, and select **Send** to call the API.

0 commit comments

Comments
 (0)