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: articles/api-management/applications.md
+36-38Lines changed: 36 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Create OAuth application access to product - Azure API Management
2
+
title: Create OAuth 2.0 application to access product APIs - Azure API Management
3
3
titleSuffix: Azure API Management
4
4
description: Learn how to configure OAuth 2.0 application-based access to products in Azure API Management, including prerequisites and step-by-step guidance.
API Management is introducing built-in OAuth 2.0 application-based access to products using the client credentials flow. API managers and developers can use applications to simplify secure OAuth 2.0-based access to APIs managed in API Management.
19
+
API Management is introducing built-in OAuth 2.0 application-based access to products using the client credentials flow. API managers and developers can use applications to simplify securing access to APIs using OAuth 2.0 authorization.
20
20
21
-
With this feature, an API manager configures an application in Microsoft Entra ID to represent a product, and registers a client application in Microsoft Entra ID that restricts access to the product's APIs. Developers obtain credentials from the developer portal to generate OAuth 2.0 tokens from Microsoft Entra ID. A developer (or client app) can then use the OAuth 2.0 client credentials flow to obtain OAuth 2.0 tokens that are passed to the API Management gateway for authorization to the product's APIs.
21
+
With this feature:
22
22
23
-
> [!NOTE]
24
-
> This feature is in private preview. Ensure that you have received instructions to access the preview and that your subscription allows you to create an API Management instance in an Early Updates Access Program (EUAP) region. See detailed [Prerequisites](#prerequisites).
23
+
* An API manager configures a product to use application based access, and registers a client application in Microsoft Entra ID that restricts access to the product's APIs.
24
+
* Developers obtain application credentials from the developer portal to generate OAuth 2.0 tokens from Microsoft Entra ID.
25
+
* A developer (or client app) can then use the OAuth 2.0 client credentials flow to obtain OAuth 2.0 tokens that are passed to the API Management gateway for authorization to the product's APIs.
26
+
27
+
> [!IMPORTANT]
28
+
> This feature is in private preview. Ensure that you can create an API Management instance in an Early Updates Access Program (EUAP) region. See detailed [Prerequisites](#prerequisites).
25
29
>
26
30
27
31
This article describes the following steps:
28
32
29
-
* Enable application-based access for a product in API Management.
30
-
* Create a client application in API Management that restricts access to the product.
31
-
* View the client application in the developer portal and get credentials to the product's APIs.
32
-
* Test OAuth 2.0 token-based access the product's associated API.
33
+
* Enable application-based access for a product in API Management
34
+
* Create a client application in API Management that restricts access to the product
35
+
* View the client application in the developer portal and get credentials to the product's APIs
36
+
* Test OAuth 2.0 token-based access to the product's associated API
33
37
34
38
35
39
<!-- Clarify personas
@@ -43,31 +47,22 @@ This feature enables:
43
47
44
48
## Prerequisites
45
49
46
-
- An API Management instance deployed in one of the Azure Early Updates Access Program (EUAP) regions, such as Central US EUAP. To create an API Management service instance, see [Create an API Management service instance](get-started-create-service-instance.md). The API Management instance must be in **Premium**, **Standard**, **Basic**, or **Developer** tier.
50
+
- An API Management instance deployed in one of the Azure Early Updates Access Program (EUAP) regions, such as Central US EUAP. To create an API Management service instance, see [Create an API Management service instance](get-started-create-service-instance.md). The API Management instance must be in the **Premium**, **Standard**, **Basic**, or **Developer** tier.
47
51
48
52
> [!NOTE]
49
53
> If you don't have access to an EUAP region, you can [request it](/troubleshoot/azure/general/region-access-request-process) through the Azure portal.
50
54
51
-
- At least one product in your API Management instance, with at least one API assigned to it. If you haven't yet created a product, see [Create and publish a product](api-management-howto-add-products.md). For testing, you may use the default **Starter** product and the **Echo** API that's added to it. The product should be in the **Published** state so that it can be accessed by developers through the developer portal.
52
-
53
-
- Permissions to create an app registration in your Microsoft Entra tenant.
55
+
- At least one product in your API Management instance, with at least one API assigned to it. If you haven't yet created a product, see [Create and publish a product](api-management-howto-add-products.md).
56
+
For testing, you can use the default **Starter** product and the **Echo** API that's added to it. The product should be in the **Published** state so that it can be accessed by developers through the developer portal.
54
57
55
-
-Permissions to assign the **Application Administrator** role, which requires at least the **Privileged Role Administrator** role in Microsoft Entra.
58
+
-Sufficient permissions tenant to assign the **Application Administrator** role in Microsoft Entra, which requires at least the **Privileged Role Administrator** role.
56
59
57
60
- Optionally, add one or more [users](api-management-howto-create-or-invite-developers.md) in your API Management instance.
<!-- Any special considerations to access the preview - regions, special URLs, etc. -->
63
-
64
-
65
-
66
-
67
64
<!-- Clarify personas for API Management and developer portal. -->
68
65
69
-
70
-
71
66
## Configure managed identity
72
67
73
68
1. Enable a system-assigned [managed identity for API Management](api-management-howto-use-managed-service-identity.md) in your API Management instance.
@@ -85,7 +80,7 @@ This feature enables:
85
80
86
81
## Enable application based access for product
87
82
88
-
Follow these steps to enable **Application based access** for a product. Enabling this setting automatically creates an application in Microsoft Entra ID to represent the selected product.
83
+
Follow these steps to enable **Application based access** for a product. A product must have this setting enabled to be associated with a client application in later steps.
89
84
90
85
The following example uses the **Starter** product, but choose any published product that has at least one API assigned to it.
91
86
@@ -104,11 +99,11 @@ The following example uses the **Starter** product, but choose any published pro
104
99
105
100
## Review product application settings
106
101
107
-
Enabling application based access create an enterprise application in Microsoft Entra ID to represent the product.
102
+
Enabling application based access create a backend enterprise application in Microsoft Entra ID to represent the product.
108
103
109
-
The application is named with the following format: **APIMProductApplication<product-name>**. For example, if the product name is **Starter**, the application name is **APIMProductApplicationStarter**. The application has an **App role** defined.
104
+
The application is named with the following format: **APIMProductApplication\<product-name\>**. For example, if the product name is **Starter**, the application name is **APIMProductApplicationStarter**. The application has an **App role** defined.
110
105
111
-
You can review application settings in **App registrations**.
106
+
Review application settings in **App registrations**:
112
107
113
108
1. Sign in to the Azure portal and navigate to **Microsoft Entra ID** > **Manage** > **App registrations**.
114
109
1. Select **All applications**.
@@ -120,9 +115,9 @@ You can review application settings in **App registrations**.
120
115
121
116
## Create client application to access product
122
117
123
-
Now create a client application that will be registered in Microsoft Entra ID and restricts to access one or more products.
118
+
Now create a client application that is registered in Microsoft Entra ID and restricts access to one or more products.
124
119
125
-
* A product must have **Application based access** enabled to be associated with the client application.
120
+
* A product must have **Application based access** enabled to be associated with a client application.
126
121
* Each client application has a single user (owner) in the API Management instance that can access product APIs through the application.
127
122
* A product can be associated with more than one client application.
128
123
@@ -148,28 +143,35 @@ The application is added to the list of applications on the **Applications** pan
148
143
149
144
Review the settings for the client application in Microsoft Entra ID.
150
145
151
-
The application is named with the following format: **APIMApplication<product-name>**. For example, if the product name is **Starter**, the application name is similar to **APIMApplicationStarter**.
152
-
You can review application settings in **App registrations**.
146
+
The application is named with the following format: **APIMApplication\<product-name\>**. For example, if the product name is **Starter**, the application name is similar to **APIMApplicationStarter**.
147
+
148
+
Review application settings in **App registrations**.
153
149
154
150
1. Sign in to the Azure portal and navigate to **Microsoft Entra ID** > **Manage** > **App registrations**.
155
151
1. Select **All applications**.
156
152
1. Search for and select the client application created by API Management.
157
153
1. In the left menu, under **Manage**, select **API permissions**.
158
-
1. Confirm that the application has permissions to access the backend product applications.
154
+
1. Confirm that the application has permissions to access the backend product application or applications.
159
155
160
156
For example, if the client application grants access to the **Starter** product, the application has **Product.Starter.All** permissions to access the **APIMProductApplicationStarter** application.
161
157
162
158
<!-- Insert screenshot -->
163
159
164
160
165
-
## Create token and use with API call
161
+
## List applications and get secrets in the developer portal
166
162
163
+
[TBD]
167
164
168
-
Run the following Azure PowerShell scripts to call the client application to generate a token, then use the token to call a product API in API Management.
165
+
## Create token and use with API call
169
166
170
-
<!-- Warn about secure handling of token and secrets -->
167
+
A developer or client app can run the following Azure PowerShell scripts to call the client application to generate a token, and then use the token to call a product API in API Management.
168
+
169
+
> [!CAUTION]
170
+
> The following scripts are examples for testing purposes only. In production, use a secure method to store and retrieve the client secret.
171
171
172
172
### Call client application to generate token
173
+
174
+
173
175
```powershell
174
176
175
177
# Replace placeholder values with your own values.
@@ -211,10 +213,6 @@ Write-Host "Response:"
211
213
$getresponse | ConvertTo-Json -Depth 5
212
214
```
213
215
214
-
## List applications and get secrets in the developer portal
0 commit comments