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/using-network-security-perimeter.md
+49-43Lines changed: 49 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: How to front a network security perimeter-protected Azure resource with Azure API Management
3
3
description: Step-by-step guidance to secure an Azure service backend with a network security perimeter and access it via Azure API Management using managed identity.
4
-
ms.service: api-management
4
+
ms.service: azure-api-management
5
5
ms.topic: how-to
6
6
ms.date: 01/22/2026
7
7
author: dlepow
@@ -13,31 +13,35 @@ ai-usage: ai-assisted
13
13
14
14
This article shows how to secure an Azure service resource with a network security perimeter and access it through Azure API Management. You'll configure an Azure Storage account with a network security perimeter to allow traffic from your subscription (containing the API Management instance), use API Management's managed identity to authenticate to Azure Storage, and verify access with the API Management test console.
15
15
16
-
For background concepts and terminology, see [What is a network security perimeter?](/azure/private-link/network-security-perimeter-concepts).
16
+
For background concepts and terminology, see [What is a network security perimeter?](/azure/private-link/network-security-perimeter-concepts)
17
17
18
18
## Why use a network security perimeter with API Management?
19
19
20
-
Beginning March 2026, [API Management is retiring trusted service connectivity](/breaking-changes/trusted-service-connectivity-retirement-march-2026.md) from the gateway to select backend Azure services. If those backends such as Azure storage accounts rely on trusted Microsoft services or resource instances for network access, you must migrate. A network security perimeter provides the supported, centralized perimeter to explicitly allow traffic while keeping public access disabled.
20
+
Beginning March 2026, [API Management is retiring trusted service connectivity](breaking-changes/trusted-service-connectivity-retirement-march-2026.md) from the gateway to select backend Azure services. If those backends such as Azure storage accounts rely on trusted Microsoft services or resource instances for network access, you must migrate. A network security perimeter provides the supported, centralized perimeter to explicitly allow traffic while keeping public access disabled.
21
21
22
22
-**Modern token trust model:** Managed identity tokens now include trust mode claims that no longer permit implicit network bypass. A network security perimeter establishes the explicit network path your backend requires.
23
23
-**Centralized governance:** A network security perimeter consolidates per‑service network rules into a single perimeter, improving consistency and observability across protected resources.
24
-
-**Works without a virtual network:** For API Management instances not integrated with a virtual network, network security perimeter enables secure access by subscription or IP range. If virtual network integration is available and preferred, you can continue to use that approach.
24
+
-**Works without a virtual network:** For API Management instances not isolated with a virtual network, network security perimeter enables secure access by subscription or IP range. If virtual network isolation is available and preferred, you can continue to use that approach.
25
25
26
26
## Prerequisites
27
27
28
28
- An Azure subscription and Owner or Contributor permissions.
29
29
- An Azure API Management instance with system-assigned managed identity enabled.
30
-
- An Azure Storage account with a container and at least one test blob (for example, a JSON file).
31
-
32
-
To begin, enable public network access to the storage account. By default, this setting also enables trusted Microsoft services and resource instances to access the storage account. You modify access later when associating the network security perimeter.
30
+
- An Azure Storage account
31
+
- Configure a container and at least one test blob (for example, a JSON file).
32
+
-To begin, enable public network access to the storage account. By default, this setting also enables trusted Microsoft services and resource instances to access the storage account. You modify access later when associating the network security perimeter.
33
33
34
34
## Overview of steps
35
35
36
36
1. Configure API Management to call Azure Storage using a managed identity.
37
+
37
38
1. Create a network security perimeter profile and associate the storage account.
38
-
1. Add an inbound access rule to allow API Management traffic (by subscription).
39
+
40
+
1. Add an inbound access rule to allow API Management traffic.
41
+
39
42
1. Test the API call from API Management to confirm access with network security perimeter.
40
-
1. Move network security perimeter access mode from **Transition** to **Enforced**.
43
+
44
+
1. Move network security perimeter access mode from **transition** to **enforced**.
41
45
42
46
## Step 1. Configure API Management to call Azure Storage by using managed identity
43
47
@@ -46,42 +50,42 @@ Configure API Management to call Azure Storage. Add a test API and operation, an
46
50
1. In the [Azure portal](https://portal.azure.com/), go to your API Management instance.
47
51
1. Ensure system-assigned managed identity is enabled:
48
52
1. In the left menu, select **Security** > **Managed identities**.
49
-
1. On the **System assigned** tab, set **Status** to **On**. Select **Save**.
53
+
1. On the **System assigned** tab, set **Status** to **On** if not already enabled. Select **Save**.
50
54
1. Go to the storage account and grant the managed identity access:
51
55
1. In the left menu, select **Access control (IAM)** > **Add role assignment**.
52
56
1. Select **Storage Blob Data Reader** role (or **Contributor**, if write access is required) and assign to the API Management managed identity.
53
57
1. Complete the role assignment steps.
54
58
55
59
### Configure an API operation to call Azure Storage
56
60
57
-
1. Add an example API that fronts the Azure Storage blob URI (for example, `https://<storage-account-name>.blob.core.windows.net/apimtest`).
61
+
1. Add an HTTP API that fronts the Azure Storage blob URI (for example, `https://<storage-account-name>.blob.core.windows.net/apimtest`).
58
62
1. Add a GET operation targeting the container.
59
63
:::image type="content" source="media/using-network-security-perimeter/api-operation.png" alt-text="Screenshot showing a sample API operation to access a blob container in the portal.":::
60
64
61
65
1. On the **Design** tab, select the operation and then select the policy editor (`</>`). Edit the operation's policy definition to add the API version header and managed identity authentication. Example:
62
66
63
-
```xml
64
-
<policies>
65
-
<inbound>
66
-
<base />
67
-
<!-- Authenticate to Storage using API Management managed identity -->
> - The `resource` value should be `https://storage.azure.com/` for Azure Storage.
@@ -91,10 +95,9 @@ Configure API Management to call Azure Storage. Add a test API and operation, an
91
95
92
96
Before configuring the network security perimeter, test that the API operation can reach the storage account.
93
97
94
-
1. In API Management, open your API operation that calls Azure Storage:
95
-
1. In the left menu, under **APIs**, select your API and operation.
96
-
1. Select the **Test** tab.
97
-
1. Select **Test** and call the operation. Optionally select **Trace** to capture detailed telemetry.
98
+
1. In the left menu, under **APIs**, select your API and operation.
99
+
1. Select the **Test** tab.
100
+
1. Select **Test** and call the operation. Optionally select **Trace** to capture detailed telemetry.
98
101
99
102
Expected results:
100
103
- The call succeeds with a `200 OK` response and returns the blob content.
@@ -116,7 +119,7 @@ Expected results:
116
119
117
120
## Step 3. Add an inbound access rule to allow API Management traffic
118
121
119
-
To allow API Management to reach the storage account through the perimeter, add an inbound rule. The simplest approach is by subscription.
122
+
To allow API Management to reach the storage account through the perimeter, add an inbound rule. The simplest approach is by Azure subscription.
120
123
121
124
1. In the Azure portal, go to your network security perimeter.
122
125
1. In the left menu of the network security perimeter, select **Settings** > **Profiles**, then select the profile you created.
@@ -131,18 +134,21 @@ To allow API Management to reach the storage account through the perimeter, add
131
134
132
135
### Confirm the network configuration in the storage account
133
136
134
-
1. In the Azure portal, go to your Azure Storage account.
137
+
1. In the Azure portal, go to your storage account.
135
138
1. In the left menu, under **Security + networking**, select **Networking**.
136
139
1. On the **Public access** tab, select **Manage**. **Disable** public network access.
137
140
1. Under **Network security perimeter**, confirm that the storage account is associated with your network security perimeter profile and that the access rule is listed.
141
+
138
142
:::image type="content" source="media/using-network-security-perimeter/public-access-settings.png" alt-text="Screenshot of public access settings in the storage account in the portal.":::
139
143
140
144
## Step 4. Test access from API Management
141
145
142
-
1. In API Management, open your API operation that calls Azure Storage:
143
-
1. In the left menu, under **APIs**, select your API and operation.
144
-
1. Select the **Test** tab.
145
-
1. Select **Test** and call the operation. Optionally select **Trace** to capture detailed telemetry.
146
+
Test that the API operation can reach the storage account in the network security perimeter.
147
+
148
+
1. In the Azure portal, go to your API Management instance.
149
+
1. In the left menu, under **APIs**, select your API and operation.
150
+
1. Select the **Test** tab.
151
+
1. Select **Test** and call the operation. Optionally select **Trace** to capture detailed telemetry.
146
152
147
153
Expected result:
148
154
- The call succeeds with a `200 OK` response and returns the blob content.
0 commit comments