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/api-management-howto-use-managed-service-identity.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Use managed identities in Azure API Management | Microsoft Docs
3
-
description: Learn how to create system-assigned and user-assigned identities in API Management by using the Azure portal, PowerShell, and a Resource Manager template. Learn about supported scenarios with managed identities.
2
+
title: Use Managed Identities in Azure API Management | Microsoft Docs
3
+
description: Learn how to create system-assigned and user-assigned identities in API Management by using the Azure portal, PowerShell, and Resource Manager templates. Learn about supported scenarios with managed identities.
4
4
services: api-management
5
5
author: dlepow
6
6
@@ -9,51 +9,53 @@ ms.topic: how-to
9
9
ms.date: 05/19/2025
10
10
ms.author: danlep
11
11
ms.custom: devx-track-azurepowershell
12
+
13
+
#customer intent: As an API developer, I want to create managed identities so that API Management can access other resources.
This article shows you 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 allows your API Management instance to easily and securely access other Microsoft Entra protected resources, such as Azure Key Vault. Azure manages this identity, 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).
20
+
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).
19
21
20
22
You can grant two types of identities to an API Management instance:
21
23
22
24
- 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.
23
25
- A *user-assigned identity* is a standalone Azure resource that can be assigned to your service. The service can have multiple user-assigned identities.
24
26
25
27
> [!NOTE]
26
-
> Managed identities are specific to the Microsoft Entra tenant where 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'll need to recreate and configure the identities.
28
+
> 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 re-create and reconfigure the identities.
To set up a managed identity in the Azure portal, you'll first create an API Management instance and then enable the feature.
36
+
To set up a managed identity in the Azure portal, you create an API Management instance and then enable the feature.
35
37
36
-
1. Create an API Management instance in the portal as you normally would. Browse to it in the portal.
38
+
1. Create an API Management instance in the portal as you normally would. Go to it in the portal.
37
39
2. In the left menu, under **Security**, select **Managed identities**.
38
40
3. On the **System assigned** tab, switch **Status** to **On**. Select **Save**.
39
41
40
-
:::image type="content" source="./media/api-management-howto-use-managed-service-identity/enable-system-identity.png" alt-text="Selections for enabling a system-assigned managed identity" border="true":::
42
+
:::image type="content" source="./media/api-management-howto-use-managed-service-identity/enable-system-identity.png" alt-text="Screenshot that shows how to enable a system-assigned managed identity." border="true":::
The following steps walk you through creating an API Management instance and assigning it an identity by using Azure PowerShell.
48
+
The following steps lead you through creating an API Management instance and assigning it an identity by using Azure PowerShell.
47
49
48
-
1. If needed, install Azure PowerShell by using the instructions in the [Azure PowerShell guide](/powershell/azure/install-azure-powershell). Then run `Connect-AzAccount` to create a connection with Azure.
50
+
1. If you need to, install Azure PowerShell by following the instructions in the [Azure PowerShell guide](/powershell/azure/install-azure-powershell). Then run `Connect-AzAccount` to create a connection with Azure.
49
51
50
-
2. Use the following code to create the instance with a system-assigned managed identity. For more examples of how to use Azure PowerShell with an API Management instance, see [API Management PowerShell samples](powershell-samples.md).
52
+
2. Use the following code to create the instance with a system-assigned managed identity. For more examples of how to use Azure PowerShell with API Management, see [API Management PowerShell samples](powershell-samples.md).
@@ -77,9 +79,9 @@ You can create an API Management instance with a system-assigned identity by inc
77
79
}
78
80
```
79
81
80
-
This property tells Azure to create and manage the identity for your API Management instance.
82
+
This property instructs Azure to create and manage the identity for your API Management instance.
81
83
82
-
For example, a complete Azure Resource Manager template might look like the following:
84
+
For example, a complete Azure Resource Manager template might look like this one:
83
85
84
86
```json
85
87
{
@@ -119,11 +121,11 @@ When the instance is created, it has the following additional properties:
119
121
The `tenantId` property identifies which Microsoft Entra tenant the identity belongs to. The `principalId` property is a unique identifier for the instance's new identity. Within Microsoft Entra ID, the service principal has the same name that you gave to your API Management instance.
120
122
121
123
> [!NOTE]
122
-
> An API Management instance can have both system-assigned and user-assigned identities at the same time. In this case, the `type` property would be`SystemAssigned,UserAssigned`.
124
+
> An API Management instance can have both system-assigned and user-assigned identities at the same time. In that scenario, the `type` property is`SystemAssigned,UserAssigned`.
123
125
124
-
## Configure Key Vault access using a managed identity
126
+
## Configure Key Vault access by using a managed identity
125
127
126
-
The following configurations are needed for API Management to access certificates from an Azure key vault.
128
+
The following configurations are required if you want to use API Management to access certificates from an Azure key vault.
Copy file name to clipboardExpand all lines: includes/api-management-key-vault-access.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,16 @@ ms.author: danlep
7
7
---
8
8
9
9
### Configure access to key vault
10
-
1. In the portal, navigate to your key vault.
11
-
1. In the left menu, select **Access configuration**, and note the **Permission model** that is configured.
10
+
11
+
1. In the portal, go to your key vault.
12
+
1. In the left menu, select **Access configuration**. Note the **Permission model** that's configured.
12
13
1. Depending on the permission model, configure either a [key vault access policy](/azure/key-vault/general/assign-access-policy) or [Azure RBAC access](/azure/key-vault/general/rbac-guide) for an API Management managed identity.
13
14
14
-
**To add a key vault access policy:<br/>**
15
+
**To add a key vault access policy:**
15
16
16
17
1. In the left menu, select **Access policies**.
17
18
1. On the **Access policies** page, select **+ Create**.
18
-
1. On the **Permissions** tab, under **Secret permissions**, select **Get** and **List**, then select **Next**.
19
+
1. On the **Permissions** tab, under **Secret permissions**, select **Get** and **List**, and then select **Next**.
19
20
1. On the **Principal** tab, **Select principal**, search for the resource name of your managed identity, and then select **Next**.
20
21
If you're using a system-assigned identity, the principal is the name of your API Management instance.
21
22
1. Select **Next** again. On the **Review + create** tab, select **Create**.
1. In the left menu, select **Access control (IAM)**.
13
13
1. On the **Access control (IAM)** page, select **Add role assignment**.
14
14
1. On the **Role** tab, select **Key Vault Certificate User**.
15
15
1. On the **Members** tab, select **Managed identity** > **+ Select members**.
16
-
1. On the **Select managed identity** page, select the system-assigned managed identity or a user-assigned managed identity associated with your API Management instance, and then select **Select**.
16
+
1. On the **Select managed identity** page, select the system-assigned managed identity or a user-assigned managed identity that's associated with your API Management instance, and then click **Select**.
0 commit comments