Skip to content

Commit a245046

Browse files
Merge pull request #6951 from MicrosoftDocs/main
Auto Publish – main to live - 2025-09-05 05:05 UTC
2 parents de1cf56 + 055b2e9 commit a245046

File tree

5 files changed

+293
-71
lines changed

5 files changed

+293
-71
lines changed
Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
---
2+
title: Add Azure AI Foundry to Network Security Perimeter
3+
description: Discover how to secure your Azure AI Foundry resource by joining it to a network security perimeter, ensuring enhanced data protection and controlled access.
4+
author: jonburchel
5+
ms.author: jburchel
6+
ms.reviewer: meerakurup
7+
ms.date: 08/28/2025
8+
ms.topic: concept-article
9+
ms.service: azure-ai-foundry
10+
ai.usage: ai-assisted
11+
---
12+
13+
# Add Azure AI Foundry to a network security perimeter
14+
15+
> [!NOTE]
16+
> Azure AI Foundry support for network security perimeter is in public preview under supplemental terms of use. It's available in regions providing the feature. This preview version is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities. Review the limitations and considerations section before you start.
17+
18+
## Overview
19+
20+
This article explains how to join an Azure AI Foundry resource to a network security perimeter to control network access to your Azure AI Foundry resource. By joining a network security perimeter, you can:
21+
22+
- Log all access to your account in context with other Azure resources
23+
in the same perimeter.
24+
25+
- Block any data exfiltration from the account to other services outside
26+
the perimeter.
27+
28+
- Allow access to your account using inbound and outbound access
29+
capabilities of the network security perimeter.
30+
31+
You can add an Azure AI Foundry resource to a network security perimeter in the Azure portal, as described in this article. Alternatively, you can use the Azure Virtual Network Manager REST API to join a service and use the Management REST APIs to view and synchronize the configuration settings.
32+
33+
[!INCLUDE [uses-fdp-only](../includes/uses-fdp-only.md)]
34+
35+
## Limitations and considerations
36+
37+
- Azure AI Foundry customer-managed keys might not behave as expected. The Azure AI Foundry resources in the Azure subscription might not be able to use the fine-tune API or assistants API.
38+
39+
- Network security perimeter controls only data plane operations within Azure AI Foundry, not control plane operations. For example, users can deploy a model within their Azure OpenAI resource secured by the perimeter, but cannot use fine-tuned models, upload files, or start a session in the Chat Playground. In these data plane scenarios, an
40+
error message will show that access is blocked by the Network Security Perimeter, as expected.
41+
42+
- For an Azure AI Foundry service within a network security perimeter, the resource must use a system or user-assigned managed identity and have a role assignment that permits read-access to data sources.
43+
44+
- Consider securing with a network security perimeter when configuring Azure Blob Storage for Azure AI Foundry. Azure AI Foundry now supports using Azure Blob Storage for Azure AI Foundry Batch input and output files. Secure communications with Blob Storage and Azure OpenAI by placing both resources in the same perimeter. For more on the Azure OpenAI Batch and Blob Storage scenario, see Configuring Azure Blob Storage for Azure OpenAI.
45+
46+
- The Foundry Agent Service supports [Network security perimeter](/azure/private-link/network-security-perimeter-concepts). However, in Secured Standard Agents with network isolation, NSP is neither required nor supported, as all resources connect securely via Private Link within the customer's virtual network, eliminating the need for public IP or FQDN definitions.
47+
48+
## Prerequisites
49+
50+
> [!CAUTION]
51+
> Make sure you fully understand the limitations and impact to your Azure Subscription listed in the previous section before registering the preview feature.
52+
53+
Register the network security perimeter feature from the Azure portal preview features. The feature names are the following:
54+
55+
- `OpenAI.NspPreview`
56+
57+
Or use the following CLI commands to register the two Preview features
58+
59+
```azurecli-interactive
60+
az feature registration create --name OpenAI.NspPreview --namespace
61+
Microsoft.CognitiveServices
62+
```
63+
64+
Ensure the `Microsoft.CognitiveServices` and `Microsoft.Network` providers are registered. To check if the feature flags are allowlisted, use `command az feature registration list`.
65+
66+
## Assign an Azure AI Foundry account to a network security perimeter
67+
68+
Azure Network Security Perimeter allows administrators to define a logical network isolation boundary for PaaS resources (for example, Azure Storage and Azure SQL Database) that are deployed outside virtual networks. It restricts communication to resources within the perimeter, and it allows non-perimeter public traffic through inbound and outbound access rules.
69+
70+
You can add Azure AI Foundry to a network security perimeter so that all requests occur within the security boundary.
71+
1. In the Azure portal, find the network security perimeter service for your subscription.
72+
1. Select Associated Resources from the left-hand menu.
73+
1. Select Add > Associate resources with an existing profile.
74+
1. Select the profile you created when you created the network security perimeter for a profile.
75+
1. Select Associate, and then select the Azure AI Foundry resource you created.
76+
1. Select Associate in the bottom left-hand section of the screen to create the association.
77+
78+
79+
## Network security perimeter access modes
80+
81+
Network security perimeter supports two different access modes for associated resources:
82+
83+
|Mode |Description |
84+
|---------|---------|
85+
|Learning mode | This is the default access mode. In learning mode, network security perimeter logs all traffic to the Azure AI Foundry resource that would have been denied if the perimeter was in enforced mode. This allows network administrators to understand the existing access patterns of the Azure AI Foundry resource service before implementing enforcement of access rules. |
86+
|Enforced mode | In Enforced mode, network security perimeter logs and denies all traffic that isn't explicitly allowed by access rules. |
87+
88+
## Network security perimeter and Azure AI Foundry resource networking settings
89+
90+
The `publicNetworkAccess` setting determines the Azure AI Foundry resource's association with a network security perimeter.
91+
- In Learning mode, the `publicNetworkAccess` setting controls public access to the resource.
92+
- In Enforced mode, the `publicNetworkAccess` setting is overridden by the network security perimeter rules. For example, if an Azure AI Foundry resource with a `publicNetworkAccess` setting of `enabled` is associated with a network security perimeter in Enforced mode, access to the Azure AI Foundry resource is still controlled by network security perimeter access rules.
93+
94+
## Change the network security perimeter access mode
95+
96+
1. Navigate to your network security perimeter resource in the Azure portal.
97+
1. Select **Resources** in the left-hand menu.
98+
1. Find your Azure AI Foundry resource in the table.
99+
1. Select the three dots in the far right of the Azure Foundry resource row. Select **Change access mode** in the popup.
100+
1. Select the desired access mode and select Apply.
101+
102+
## Enable logging network access
103+
104+
1. Navigate to your network security perimeter resource in the Azure portal.
105+
1. Select **Diagnostic settings** in the left-hand menu.
106+
1. Select **Add diagnostic setting**.
107+
1. Enter any name such as "diagnostic" for Diagnostic setting name.
108+
1. Under Logs, select `allLogs`. `allLogs` ensures all inbound and outbound network access to resources in your network security perimeter is logged.
109+
1. Under Destination details, select Archive to a storage account or Send to Log Analytics workspace. The storage account must be in the same region as the network security perimeter. You can either use an existing storage account or create a new one. A Log Analytics workspace can be in a different region than the one used by the network security perimeter. You can also select any of the other applicable destinations.
110+
1. Select Save to create the diagnostic setting and start logging network access.
111+
112+
## Reading network access logs
113+
114+
The `network-security-perimeterAccessLogs` table contains all the logs for every log category (for example `network-security-perimeterPublicInboundResourceRulesAllowed`). Every log contains a record of the network security perimeter network access that matches the log category.
115+
Here's an example of the `network-security-perimeterPublicInboundResourceRulesAllowed` log format:
116+
117+
| **Column Name** | **Meaning** | **Example Value** |
118+
|------------------------|-----------------------------------------------------------------------------|------------------------------------------------|
119+
| Profile | Which network security perimeter the Azure AI Foundry resource was associated with | `defaultProfile` |
120+
| Matched Rule | JSON description of the rule that was matched by the log | `{ "accessRule": "IP firewall" }` |
121+
| SourceIPAddress | Source IP of the inbound network access, if applicable | `1.1.1.1` |
122+
| AccessRuleVersion | Version of the network-security-perimeter access rules used to enforce the network access rules | 0 |
123+
124+
125+
## Add an access rule for your Azure AI Foundry resource
126+
127+
A network security perimeter profile specifies rules that allow or deny access through the perimeter.
128+
Within the perimeter, all resources have mutual access at the network level. You must still set up authentication and authorization, but at the network level, connection requests from inside the perimeter are accepted.
129+
130+
For resources outside of the network security perimeter, you must specify inbound and outbound access rules. Inbound rules specify which connections to allow in, and outbound rules specify which requests are allowed out.
131+
132+
> [!NOTE]
133+
> Any service associated with a network security perimeter implicitly allows inbound and outbound access to any other service associated with the same network security perimeter when that access is authenticated using managed identities and role assignments. Access rules only need to be created when allowing access outside of the network security perimeter, or for authenticated access using API keys.
134+
135+
## Add an inbound access rule
136+
137+
138+
Inbound access rules can allow the internet and resources outside the perimeter to connect with resources inside the perimeter. Network security perimeter supports two types of inbound access rules:
139+
- IP address ranges. IP addresses or ranges must be in the Classless Inter-Domain Routing (CIDR) format. An example of CIDR notation is `192.0.2.0/24`, which represents the IPs that range from `192.0.2.0` to `192.0.2.255`. This type of rule allows inbound requests from any IP address within the range.
140+
- Subscriptions. This type of rule allows inbound access authenticated using any managed identity from the subscription.
141+
To add an inbound access rule in the Azure portal:
142+
1. Navigate to your network security perimeter resource in the Azure portal.
143+
1. Select **Profiles** in the left-hand menu.
144+
1. Select the profile you're using with your network security perimeter.
145+
1. Select **Inbound access rules** in the left-hand menu.
146+
1. Select **Add**.
147+
1. Enter or select the following values:
148+
149+
| Setting | Value |
150+
|---------|-------|
151+
| Rule name | The name for the inbound access rule (for example, `MyInboundAccessRule`). |
152+
| Source Type | Valid values are IP address ranges or subscriptions. |
153+
| Allowed Sources | If you selected IP address ranges, enter the IP address range in a CIDR format that you want to allow inbound access from. Azure IP ranges are available at this link. If you selected **Subscriptions**, use the subscription you want to allow inbound access from. |
154+
155+
1. Select **Add** to create the inbound access rule.
156+
157+
## Add an outbound access rule
158+
Recall that in public preview, Azure AI Foundry can connect to Azure Storage, Azure Cosmos DB, Azure Monitor, and Azure AI Search within the security perimeter. If you want to use other data sources, you need an outbound access rule to support that connection.
159+
Network security perimeter supports outbound access rules based on the Fully Qualified Domain Name (FQDN) of the destination. For example, you can allow outbound access from any service associated with your network security perimeter to an FQDN such as `mystorageaccount.blob.core.windows.net`.
160+
161+
To add an outbound access rule in the Azure portal:
162+
163+
1. Navigate to your network security perimeter resource in the Azure portal.
164+
1. Select **Profiles** in the left-hand menu.
165+
1. Select the profile you're using with your network security perimeter.
166+
1. Select **Outbound access rules** in the left-hand menu.
167+
1. Select **Add**.
168+
1. Enter or select the following values:
169+
170+
| Setting | Value |
171+
|---------|-------|
172+
| Rule name | The name for the outbound access rule (for example, "MyOutboundAccessRule") |
173+
| Destination Type | Leave as FQDN |
174+
| Allowed Destinations | Enter a comma-separated list of FQDNs you want to allow outbound access to |
175+
176+
1. Select **Add** to create the outbound access rule.
177+
178+
## Test your connection through network security perimeter
179+
180+
181+
To test your connection through network security perimeter, you need access to a web browser, either on a local computer with an internet connection or an Azure VM.
182+
1. Change your network security perimeter association to __enforced mode__ to start enforcing network security perimeter requirements for network access to your Azure AI Foundry resource.
183+
1. Decide if you want to use a local computer or an Azure VM.
184+
- If you're using a local computer, you need to know your public IP address.
185+
- If you're using an Azure virtual machine, you can either use a [private link](/azure/private-link/private-link-overview) or [check the IP address using the Azure portal](/azure/virtual-network/ip-services/virtual-network-network-interface-addresses).
186+
1. Using the IP address, you can create an __inbound access rule__ for that IP address to allow access. You can skip this step if you're using private link.
187+
1. Finally, try navigating to the Azure AI Foundry resource in the Azure portal. Open the Azure AI Foundry portal. Deploy a model and chat with the model in the Chat Playground. If you receive a response, then the network security perimeter is configured correctly.
188+
189+
## View and manage network security perimeter configuration
190+
191+
192+
You can use the Network Security Perimeter Configuration REST APIs to review and reconcile perimeter configurations. **Be sure to use preview API version** `2024-10-01`.
193+
194+
195+
## Related content
196+
197+
- [Role-based access control for Azure AI Foundry](../concepts/rbac-azure-ai-foundry.md)
198+
- [What is Azure AI Foundry Agent Service?](../agents/overview.md)

articles/ai-foundry/toc-files/security-governance/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ items:
1212
- name: Configure private link
1313
displayName: custom dns
1414
href: ../../how-to/configure-private-link.md
15+
- name: Network security perimeter (preview)
16+
href: ../../how-to/add-foundry-to-network-security-perimeter.md
1517
- name: Managed network for hubs
1618
items:
1719
- name: Configure managed network

0 commit comments

Comments
 (0)