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-center/import-api-management-apis.md
+6-65Lines changed: 6 additions & 65 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,14 +131,14 @@ When you add APIs from an API Management instance to your API center using `az a
131
131
132
132
### Add a managed identity in your API center
133
133
134
-
For this scenario, your API center uses a [managed identity](/entra/identity/managed-identities-azure-resources/overview) to access APIs in your API Management instance. Depending on your needs, use either a system-assigned or user-assigned managed identity. If you haven't added a managed identity in your API center, you can add it in the Azure portal or by using the Azure CLI.
134
+
For this scenario, your API center uses a [managed identity](/entra/identity/managed-identities-azure-resources/overview) to access APIs in your API Management instance. Depending on your needs, configure either a system-assigned or one or more user-assigned managed identities.
135
135
136
-
#### Add a system-assigned identity
136
+
The following examples show how to configure a system-assigned managed identity by using the Azure portal or the Azure CLI. At a high level, configuration steps are similar for a user-assigned managed identity.
137
137
138
138
#### [Portal](#tab/portal)
139
139
140
140
1. In the [portal](https://azure.microsoft.com), navigate to your API center.
141
-
1. In the left menu, select **Managed identities**.
141
+
1. In the left menu, under **Security**, select **Managed identities**.
142
142
1. Select **System assigned**, and set the status to **On**.
143
143
1. Select **Save**.
144
144
@@ -151,54 +151,6 @@ az apic service update --name <api-center-name> --resource-group <resource-group
151
151
```
152
152
---
153
153
154
-
#### Add a user-assigned identity
155
-
156
-
To add a user-assigned identity, you need to create a user-assigned identity resource, and then add it to your API center.
157
-
158
-
#### [Portal](#tab/portal)
159
-
160
-
1. Create a user-assigned identity according to [these instructions](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities#create-a-user-assigned-managed-identity).
161
-
1. In the [portal](https://azure.microsoft.com), navigate to your API center.
162
-
1. In the left menu, select **Managed identities**.
163
-
1. Select **User assigned** > **+ Add**.
164
-
1. Search for the identity you created earlier, select it, and select **Add**.
165
-
166
-
#### [Azure CLI](#tab/cli)
167
-
168
-
1. Create a user-assigned identity.
169
-
170
-
```azurecli
171
-
az identity create --resource-group <resource-group-name> --name <identity-name>
172
-
```
173
-
174
-
In the command output, note the value of the identity's `id` property. The `id` property should look something like this:
1. Create a JSON file with the following content, substituting the value of the `id` property from the previous step.
185
-
186
-
```json
187
-
{
188
-
"type": "UserAssigned",
189
-
"userAssignedIdentities": {
190
-
"<identity-id>": {}
191
-
}
192
-
}
193
-
```
194
-
195
-
1. Add the user-assigned identity to your API center using the following [az apic service update](/cli/azure/apic/service#az-apic-service-update) command. Substitute the names of your API center and resource group, and pass the JSON file as the value of the `--identity` parameter. Here, the JSON file is named `identity.json`.
196
-
197
-
```azurecli
198
-
az apic service update --name <api-center-name> --resource-group <resource-group-name> --identity "@identity.json"
199
-
```
200
-
---
201
-
202
154
### Assign the managed identity the API Management Service Reader role
203
155
204
156
To allow import of APIs, assign your API center's managed identity the **API Management Service Reader** role in your API Management instance. You can use the [portal](../role-based-access-control/role-assignments-portal-managed-identity.yml) or the Azure CLI.
@@ -211,14 +163,13 @@ To allow import of APIs, assign your API center's managed identity the **API Man
211
163
1. On the **Add role assignment** page, set the values as follows:
212
164
1. On the **Role** tab - Select **API Management Service Reader**.
213
165
1. On the **Members** tab, in **Assign access to** - Select **Managed identity** > **+ Select members**.
214
-
1. On the **Select managed identities** page - Select the system-assigned or user-assigned managed identity of your API center that you added in the previous section. Click **Select**.
166
+
1. On the **Select managed identities** page - Select the system-assigned managed identity of your API center that you added in the previous section. Click **Select**.
215
167
1. Select **Review + assign**.
216
168
217
169
#### [Azure CLI](#tab/cli)
218
170
219
-
1. Get the principal ID of the identity. If you're configuring a system-assigned identity, use the [az apic service show](/cli/azure/apic/service#az-apic-service-show) command. For a user-assigned identity, use [az identity show](/cli/azure/identity#az-identity-show).
171
+
1. Get the principal ID of the identity. For a system-assigned identity, use the [az apic service show](/cli/azure/apic/service#az-apic-service-show) command.
220
172
221
-
**System-assigned identity**
222
173
```azurecli
223
174
#! /bin/bash
224
175
apicObjID=$(az apic service show --name <api-center-name> \
@@ -233,16 +184,6 @@ To allow import of APIs, assign your API center's managed identity the **API Man
1. Get the resource ID of your API Management instance using the [az apim show](/cli/azure/apim#az-apim-show) command.
247
188
248
189
```azurecli
@@ -279,7 +220,7 @@ To allow import of APIs, assign your API center's managed identity the **API Man
279
220
--scope $scope
280
221
---
281
222
282
-
### Import APIs directly from your API Management instance
223
+
### Import APIs from API Management
283
224
284
225
Use the [az apic service import-from-apim](/cli/azure/apic/service#az-apic-service-import-from-apim) command to import one or more APIs from your API Management instance to your API center.
0 commit comments