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
+5-65Lines changed: 5 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. The following examples show how to configure a system-assigned managed identity for this scenario. At a high level, configuration steps are similar for a user-assigned managed identity.
135
135
136
-
#### Add a system-assigned identity
136
+
If you haven't added a system-assigned managed identity in your API center, you can add it in the Azure portal or by using the Azure CLI.
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
@@ -149,55 +149,6 @@ Set the system-assigned identity in your API center using the following [az apic
149
149
```azurecli
150
150
az apic service update --name <api-center-name> --resource-group <resource-group-name> --identity '{"type": "SystemAssigned"}'
151
151
```
152
-
---
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
152
202
153
### Assign the managed identity the API Management Service Reader role
203
154
@@ -211,14 +162,13 @@ To allow import of APIs, assign your API center's managed identity the **API Man
211
162
1. On the **Add role assignment** page, set the values as follows:
212
163
1. On the **Role** tab - Select **API Management Service Reader**.
213
164
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**.
165
+
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
166
1. Select **Review + assign**.
216
167
217
168
#### [Azure CLI](#tab/cli)
218
169
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).
170
+
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
171
221
-
**System-assigned identity**
222
172
```azurecli
223
173
#! /bin/bash
224
174
apicObjID=$(az apic service show --name <api-center-name> \
@@ -233,16 +183,6 @@ To allow import of APIs, assign your API center's managed identity the **API Man
0 commit comments