Skip to content

Commit b48034a

Browse files
committed
applied suggestions from LAA
1 parent c26817a commit b48034a

1 file changed

Lines changed: 30 additions & 28 deletions

File tree

articles/api-management/api-management-howto-use-managed-service-identity.md

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ ms.custom:
1919

2020
[!INCLUDE [api-management-availability-all-tiers](../../includes/api-management-availability-all-tiers.md)]
2121

22-
This article shows how to create a managed identity for an Azure API Management instance and how to use it to access other resources. A managed identity generated by Microsoft Entra ID enables API Management to easily and securely access other resources that are protected by Microsoft Entra, like Azure Key Vault. Azure manages these identities, so you don't have to provision or rotate any secrets. For more information about managed identities, see [What are managed identities for Azure resources?](../active-directory/managed-identities-azure-resources/overview.md)
22+
This article shows how to create a managed identity for an Azure API Management instance and how to use it to access other resources. By using a managed identity generated by Microsoft Entra ID, API Management can easily and securely access other resources that are protected by Microsoft Entra, like Azure Key Vault. Azure manages these identities, so you don't have to provision or rotate any secrets. For more information about managed identities, see [What are managed identities for Azure resources?](../active-directory/managed-identities-azure-resources/overview.md)
2323

2424
You can grant two types of identities to an API Management instance:
2525

2626
- A *system-assigned identity* is tied to your service and is deleted if your service is deleted. The service can have only one system-assigned identity.
27-
- A *user-assigned identity* is a standalone Azure resource that can be assigned to your service. The service can have multiple user-assigned identities.
27+
- A *user-assigned identity* is a standalone Azure resource that you can assign to your service. The service can have multiple user-assigned identities.
2828

2929
> [!NOTE]
30-
> - Managed identities are specific to the Microsoft Entra tenant in which your Azure subscription is hosted. They don't get updated if a subscription is moved to a different directory. If a subscription is moved, you need to recreate and reconfigure the identities.
30+
> - Managed identities are specific to the Microsoft Entra tenant in which your Azure subscription is hosted. They don't get updated if you move a subscription to a different directory. If you move a subscription, you need to recreate and reconfigure the identities.
3131
> - API Management managed identities are also specific to the Azure subscription in which the service is hosted. If you move the service to a different subscription in the same tenant, you need to recreate and reconfigure the identities.
3232
3333
[!INCLUDE [api-management-workspace-availability](../../includes/api-management-workspace-availability.md)]
@@ -36,7 +36,9 @@ You can grant two types of identities to an API Management instance:
3636

3737
### Azure portal
3838

39-
To set up a managed identity in the Azure portal, you create an API Management instance and then enable the feature.
39+
In the Azure portal, you can enable a system-assigned managed identity when you create an API Management instance, or you can create an API Management instance and then enable the feature.
40+
41+
To enable a managed identity in an existing instance:
4042

4143
1. Create an API Management instance in the portal as you normally would. Go to it in the portal.
4244
1. In the left menu, under **Security**, select **Managed identities**.
@@ -84,7 +86,7 @@ You can create an API Management instance with a system-assigned identity by inc
8486

8587
This property instructs Azure to create and manage the identity for your API Management instance.
8688

87-
For example, a complete ARM template might look like this one:
89+
For example, a complete ARM template might look like the following example:
8890

8991
```json
9092
{
@@ -128,34 +130,34 @@ The `tenantId` property identifies which Microsoft Entra tenant the identity bel
128130
129131
## Configure Key Vault access by using a managed identity
130132

131-
The following configurations are required if you want to use API Management to access certificates from an Azure key vault.
133+
To use API Management to access certificates from an Azure key vault, configure the following settings.
132134

133135
[!INCLUDE [api-management-key-vault-certificate-access](../../includes/api-management-key-vault-certificate-access.md)]
134136

135137
[!INCLUDE [api-management-key-vault-network](../../includes/api-management-key-vault-network.md)]
136138

137139
## Supported scenarios that use system-assigned identity
138140

139-
Following are some common scenarios for using a system-assigned managed identity in Azure API Management.
141+
The following list shows some common scenarios for using a system-assigned managed identity in Azure API Management.
140142

141143
### Obtain a custom TLS/SSL certificate for the API Management instance from Key Vault
142144

143-
You can use the system-assigned identity of an API Management instance to retrieve custom TLS/SSL certificates that are stored in Key Vault. You can then assign these certificates to custom domains in the API Management instance. Take these considerations into account:
145+
You can use the system-assigned identity of an API Management instance to retrieve custom TLS/SSL certificates that are stored in Key Vault. You can then assign these certificates to custom domains in the API Management instance. Consider the following points:
144146

145147
- The content type of the secret must be *application/x-pkcs12*. For more information, see [Domain certificate options](configure-custom-domain.md?tabs=key-vault#domain-certificate-options).
146148
- You must use the Key Vault certificate secret endpoint, which contains the secret.
147149

148-
> [!Important]
150+
> [!IMPORTANT]
149151
> If you don't provide the object version of the certificate, API Management automatically obtains any newer version of the certificate within four hours after it's updated in Key Vault.
150152
151153
The following example shows an ARM template that uses the system-assigned managed identity of an API Management instance to retrieve a custom domain certificate from Key Vault.
152154

153155
#### Prerequisites
154156

155157
* An API Management instance that's configured with a system-assigned managed identity. To create the instance, you can use an [Azure Quickstart Template](https://azure.microsoft.com/resources/templates/api-management-create-with-msi/).
156-
* A Key Vault instance in the same resource group. The instance must host a certificate that will be used as a custom domain certificate in API Management.
158+
* A Key Vault instance in the same resource group. The instance must host a certificate that you use as a custom domain certificate in API Management.
157159

158-
The template contains the following steps.
160+
The template contains the following steps:
159161

160162
1. Update the access policies of the Key Vault instance and allow the API Management instance to obtain secrets from it.
161163
1. Update the API Management instance by setting a custom domain name through the certificate from the Key Vault instance.
@@ -311,11 +313,11 @@ You can use a system-assigned managed identity to access Key Vault to store and
311313

312314
### Authenticate to a backend by using an API Management identity
313315

314-
You can use the system-assigned identity to authenticate to a backend service via the [authentication-managed-identity](authentication-managed-identity-policy.md) policy.
316+
Use the system-assigned identity to authenticate to a backend service via the [authentication-managed-identity](authentication-managed-identity-policy.md) policy.
315317

316318
### Connect to Azure resources behind an IP firewall by using a system-assigned managed identity
317319

318-
API Management is a trusted Microsoft service to the following resources. This trusted status enables the service to connect to the following resources behind a firewall when the firewall enables a setting to **Allow Trusted Microsoft Services to bypass this firewall**. After you explicitly assign the appropriate Azure role to the [system-assigned managed identity](../active-directory/managed-identities-azure-resources/overview.md) for a resource instance, the scope of access for the instance corresponds to the Azure role that's assigned to the managed identity.
320+
API Management is a trusted Microsoft service to the following resources. This trusted status enables the service to connect to the following resources behind a firewall when the firewall enables the **Allow Trusted Microsoft Services to bypass this firewall** setting. After you explicitly assign the appropriate Azure role to the [system-assigned managed identity](../active-directory/managed-identities-azure-resources/overview.md) for a resource instance, the scope of access for the instance corresponds to the Azure role that's assigned to the managed identity.
319321

320322

321323
- [Trusted access for Key Vault](/azure/key-vault/general/overview-vnet-service-endpoints#trusted-services)
@@ -335,7 +337,7 @@ You can configure and use a system-assigned managed identity to access an event
335337

336338
### Azure portal
337339

338-
To set up a managed identity in the portal, you must first create an API Management instance and [create a user-assigned identity](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md). Then complete the following steps.
340+
To set up a managed identity in the portal, first create an API Management instance and [create a user-assigned identity](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md). Then complete the following steps.
339341

340342
1. Go to your API Management instance in the portal.
341343
1. In the left menu, under **Security**, select **Managed identities**.
@@ -394,9 +396,9 @@ You can create an API Management instance that has an identity by including the
394396
}
395397
```
396398

397-
Adding the user-assigned type informs Azure to use the user-assigned identity that's specified for your instance.
399+
Adding the user-assigned type informs Azure to use the user-assigned identity that you specify for your instance.
398400

399-
For example, a complete ARM template might look like this one:
401+
For example, a complete ARM template might look like the following example:
400402

401403
```json
402404
{
@@ -429,7 +431,7 @@ For example, a complete ARM template might look like this one:
429431
}
430432
```
431433

432-
When the service is created, it has the following additional properties:
434+
When you create the service, it has the following additional properties:
433435

434436
```json
435437
"identity": {
@@ -446,25 +448,25 @@ When the service is created, it has the following additional properties:
446448
The `principalId` property is a unique identifier for the identity that's used for Microsoft Entra administration. The `clientId` property is a unique identifier for the application's new identity that's used for specifying which identity to use during runtime calls.
447449

448450
> [!NOTE]
449-
> An API Management instance can have both system-assigned and user-assigned identities. In that scenario, the `type` property would be `SystemAssigned,UserAssigned`.
451+
> An API Management instance can have both system-assigned and user-assigned identities. In that scenario, the `type` property is `SystemAssigned,UserAssigned`.
450452
451453
## Supported scenarios that use user-assigned managed identities
452454

453-
Following are some common scenarios for using a user-assigned managed identity in Azure API Management.
455+
The following list shows some common scenarios for using a user-assigned managed identity in Azure API Management.
454456

455457
### Obtain a custom TLS/SSL certificate for the API Management instance from Key Vault
456458

457459
You can use a user-assigned identity to establish trust between an API Management instance and Key Vault. This trust can then be used to retrieve custom TLS/SSL certificates that are stored in Key Vault. You can then assign these certificates to custom domains in the API Management instance.
458460

459461
> [!IMPORTANT]
460-
> If [Key Vault firewall](/azure/key-vault/general/network-security) is enabled on your key vault, you can't use a user-assigned identity for access from API Management. You can use the system-assigned identity instead. For more information, see the section [Requirements for key vault firewall](#requirements-for-key-vault-firewall).
462+
> If you enable [Key Vault firewall](/azure/key-vault/general/network-security) on your key vault, you can't use a user-assigned identity for access from API Management. You can use the system-assigned identity instead. For more information, see the section [Requirements for key vault firewall](#requirements-for-key-vault-firewall).
461463
462-
Take these considerations into account:
464+
Consider the following requirements:
463465

464466
- The content type of the secret must be *application/x-pkcs12*.
465467
- You must use the Key Vault certificate secret endpoint, which contains the secret.
466468

467-
> [!Important]
469+
> [!IMPORTANT]
468470
> If you don't provide the object version of the certificate, API Management automatically obtains any newer version of the certificate within four hours after it's updated in Key Vault.
469471
470472

@@ -473,7 +475,7 @@ Take these considerations into account:
473475
You can use a user-assigned managed identity to access Key Vault to store and manage secrets for use in API Management policies. For more information, see [Use named values in Azure API Management policies](api-management-howto-properties.md).
474476

475477
> [!NOTE]
476-
> If [Key Vault firewall](/azure/key-vault/general/network-security) is enabled on your key vault, you can't use a user-assigned identity for access from API Management. You can use the system-assigned identity instead. For more information, see the section [Requirements for key vault firewall](#requirements-for-key-vault-firewall).
478+
> If you enable [Key Vault firewall](/azure/key-vault/general/network-security) on your key vault, you can't use a user-assigned identity for access from API Management. You can use the system-assigned identity instead. For more information, see the section [Requirements for key vault firewall](#requirements-for-key-vault-firewall).
477479
478480
### Authenticate to a backend by using a user-assigned identity
479481

@@ -485,9 +487,9 @@ You can configure and use a user-assigned managed identity to access an event hu
485487

486488
## Remove an identity
487489

488-
You can remove a system-assigned identity by disabling the feature via the portal or an ARM template in the same way that it was created. User-assigned identities can be removed individually. To remove all identities, set the identity type to `"None"`.
490+
You can remove a system-assigned identity by disabling the feature through the portal or by using an ARM template, just like you created it. You can remove user-assigned identities individually. To remove all identities, set the identity type to `"None"`.
489491

490-
Removing a system-assigned identity in this way also deletes it from Microsoft Entra ID. System-assigned identities are also automatically removed from Microsoft Entra ID when the API Management instance is deleted.
492+
When you remove a system-assigned identity, you also delete it from Microsoft Entra ID. When you delete the API Management instance, the system-assigned identity is automatically removed from Microsoft Entra ID.
491493

492494
To remove all identities by using an ARM template, update this section:
493495

@@ -497,10 +499,10 @@ To remove all identities by using an ARM template, update this section:
497499
}
498500
```
499501

500-
> [!Important]
501-
> If an API Management instance is configured with a custom SSL certificate from Key Vault and you try to disable a managed identity, the request fails.
502+
> [!IMPORTANT]
503+
> If you configure an API Management instance with a custom SSL certificate from Key Vault and try to disable a managed identity, the request fails.
502504
>
503-
> You can resolve this by switching from a Key Vault certificate to an inline-encoded certificate and then disabling the managed identity. For more information, see [Configure a custom domain name](configure-custom-domain.md).
505+
> You can resolve this problem by switching from a Key Vault certificate to an inline-encoded certificate and then disabling the managed identity. For more information, see [Configure a custom domain name](configure-custom-domain.md).
504506
505507
## Related content
506508

0 commit comments

Comments
 (0)