Skip to content

Commit d4b18b8

Browse files
authored
Merge pull request #51156 from MicrosoftDocs/NEW-azure-policy-govern-ai
New azure policy govern ai
2 parents a672b91 + 4e35038 commit d4b18b8

16 files changed

+419
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.govern-ai-services-azure-policy.azure-policy-ai-services
3+
title: Azure Policy and AI Services
4+
metadata:
5+
title: Azure Policy and AI services
6+
description: Learn about Azure Policies related to AI services.
7+
ms.date: 06/26/2025
8+
author: Orin-Thomas
9+
ms.author: viniap
10+
ms.topic: unit
11+
durationInMinutes: 7
12+
content: |
13+
[!include[](includes/1-azure-policy-ai-services.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.govern-ai-services-azure-policy.assess-ai-workload-compliance-with-azure-policy
3+
title: Assess AI workload compliance with Azure Policy
4+
metadata:
5+
title: Assess AI workload compliance with Azure Policy
6+
description: Learn how to use Azure Policy to assess AI workload compliance.
7+
ms.date: 06/26/2025
8+
author: Orin-Thomas
9+
ms.author: viniap
10+
ms.topic: unit
11+
durationInMinutes: 10
12+
content: |
13+
[!include[](includes/2-assess-ai-workload-compliance-with-azure-policy.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.govern-ai-services-azure-policy.azure-ai-foundry-azure-machine-learning-policies
3+
title: Azure AI Foundry and Azure Machine Learning Policies
4+
metadata:
5+
title: Azure AI Foundry and Azure Machine Learning policies
6+
description: Learn about policies related to Azure AI Foundry and Azure Machine Learning.
7+
ms.date: 06/26/2025
8+
author: Orin-Thomas
9+
ms.author: viniap
10+
ms.topic: unit
11+
durationInMinutes: 14
12+
content: |
13+
[!include[](includes/3-azure-ai-foundry-azure-machine-learning-policies.md)]
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.govern-ai-services-azure-policy.knowledge-check
3+
title: Knowledge Check
4+
metadata:
5+
title: Knowledge check
6+
description: Check your knowledge.
7+
ms.date: 06/26/2025
8+
author: Orin-Thomas
9+
ms.author: viniap
10+
ms.topic: unit
11+
durationInMinutes: 4
12+
content: Choose the best response for each question.
13+
quiz:
14+
questions:
15+
- content: "You have been tasked with applying a policy to assess the state of an Azure AI Foundry deployment without interfering with its current implementation. How can you ensure the policy targets the existing Azure AI Foundry Hub?"
16+
choices:
17+
- content: "Ensure the policy definition targets resources of type \"Microsoft.MachineLearningServices/workspaces\", the policy scope targets the desired Resource Group or subscription, and Policy enforcement is disabled."
18+
isCorrect: true
19+
explanation: "Microsoft.MachineLearningServices/workspaces is the resource ID type for Azure AI Foundry and Azure Machine Learning, the scope ensures the Azure AI Foundry Hub is targeted, and disabled policy enforcement will provide assessment information only."
20+
- content: "Ensure the policy definition targets resources of type \"Microsoft.CognitiveServices\" and the policy scope targets the desired Resource Group or subscription."
21+
isCorrect: false
22+
explanation: "Microsoft.CognitiveServices is the resource ID type for Azure AI services and won't target Azure AI Foundry Hubs as a result."
23+
- content: "Ensure the policy definition targets resources of type \"Microsoft.MachineLearningServices/workspaces\", the policy scope targets the desired Resource Group or subscription, and Policy enforcement is enabled."
24+
isCorrect: false
25+
explanation: "An enabled policy enforcement interferes with the workload if the state isn't in accordance with the policy."
26+
- content: "You're a cloud operations administrator responsible for ensuring compliance of AI services in Azure. You need to restrict network access to Azure AI services to enhance security. Which policy should you apply?"
27+
choices:
28+
- content: "Azure AI Services resources should use Azure Private Link."
29+
isCorrect: false
30+
explanation: "This policy focuses on connecting your virtual network to Azure services without a public IP address, not network access."
31+
- content: "Azure AI Services resources should restrict network access."
32+
isCorrect: true
33+
explanation: "This policy ensures that only allowed networks can access the service."
34+
- content: "Azure AI Services resources should have key access disabled (disable local authentication)."
35+
isCorrect: false
36+
explanation: "This policy focuses on disabling local authentication, not network access."
37+
- content: "You've been tasked with applying a policy that should affect an Azure OpenAI service, but not an Azure AI Search that is also deployed to the same Resource Group in an Azure subscription. How can you ensure this policy doesn't affect the Azure AI Search service?"
38+
choices:
39+
- content: "Ensure the policy definition targets resources of type \"Microsoft.Search/searchServices\""
40+
isCorrect: false
41+
explanation: "By targeting Microsoft.Search/searchServices, you're affecting the Azure AI Search service only."
42+
- content: "Ensure the policy definition targets resources of type \"Microsoft.MachineLearningServices/workspaces\""
43+
isCorrect: false
44+
explanation: "Microsoft.MachineLearningServices/workspaces can be used for Azure Machine Learning and Azure AI Foundry resources."
45+
- content: "Ensure the policy definition targets resources of type \"Microsoft.CognitiveServices\""
46+
isCorrect: true
47+
explanation: "By targeting Microsoft.CognitiveServices only, you can ensure the service targets the Azure OpenAI service and not the Azure AI Search service."
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.govern-ai-services-azure-policy.summary
3+
title: Summary
4+
metadata:
5+
title: Summary
6+
description: TBD
7+
ms.date: 06/26/2025
8+
author: Orin-Thomas
9+
ms.author: viniap
10+
ms.topic: unit
11+
durationInMinutes: 1
12+
content: |
13+
[!include[](includes/5-summary.md)]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Azure Policy helps to determine that your organization's deployed workloads comply with regulatory requirements and organizational standards.
2+
3+
Azure Policy evaluates resources and actions in Azure by comparing the properties of those resources to business rules. These business rules, described in JSON format, are known as policy definitions. To simplify management, several business rules (policy definitions) can be grouped together to form a policy initiative, also referred to as a policySet. After your business rules are formed, the policy definition or initiative is assigned to any scope of resources that Azure supports. For example, management groups, subscriptions, resource groups, or individual resources. You can create new policy definitions and initiatives, or you can use preexisting, built-in policies created by Microsoft.
4+
5+
Some businesses workload deployments need to comply with government regulatory standards such as FedRAMP. To help these organizations, Microsoft has created policy initiative definitions, known as built-ins, that map to the compliance domains and security controls included in important compliance standards. For example, an organization that must comply with FedRAMP can apply the FedRAMP Moderate or FedRAMP High initiatives available in Azure Policy to assess the compliance of a workload's configuration.
6+
7+
As an AI workload operations administrator, Azure it's your responsibility to ensure services are following the business, security, and regulatory guidelines for your company. In that role, you should consider using Azure Policy with the following services:
8+
9+
- Azure AI services: This is a suite of Azure services to help developers create applications with out-of-the-box, prebuilt, and customizable APIs and models. Services in this suite include Azure OpenAI service, Azure AI Search, Azure AI Document Intelligence, and more.
10+
- Azure AI Foundry: Azure AI Foundry is a cloud service for the full lifecycle of application development. With AI Foundry developers can explore, build, test, and deploy AI tools and ML models.
11+
- Azure Machine Learning: Azure Machine Learning is a cloud service for accelerating and managing the machine learning (ML) project lifecycle.
12+
13+
Policy definitions or initiatives have a scope to which they're applied. When you apply the scope of a Resource Group (or another scope) to a definition or initiative, the JSON file for the underlying policy definition targets resources based on the resource type.
14+
15+
Here's an example definition for an audit policy to enable the usage of Private Endpoint for Azure AI services on GitHub:
16+
17+
[![A screenshot of the Azure portal, with an Azure AI services policy related to private endpoints displayed.](../media/ai-services-policy.svg)](../media/ai-services-policy-big.svg#lightbox)
18+
19+
This definition runs under its scope against any resource of type Microsoft.CognitiveServices. When you analyze the resource ID structure of a service such as Azure OpenAI, you can see the resource type: /subscriptions/\<subscriptionID>/resourceGroups/\<RG-name>/providers/Microsoft.CognitiveServices/accounts/ContosoAIDemo
20+
21+
The result is this resource (Azure OpenAI) will be affected by the policy definition, unless an explicit exclusion is in place. The same will be true for any Azure AI service as they have the same resource type attribute.
22+
23+
> [!NOTE]
24+
> Some Azure services branded under "Azure AI services" have different resource ID designations, such as Azure AI Search. The JSON files for policy definitions under "Azure AI services" should have both resource ID types listed as part of their rules. However, the service itself might have extra definitions that are applicable to the service only.
25+
26+
Here's an example definition for an audit policy to deploy a private endpoint to Azure Machine Learning:
27+
28+
[![A screenshot of the Azure portal, with an Azure Machine Learning policy related to private endpoints displayed.](../media/machine-learning-policy.svg)](../media/machine-learning-policy-big.svg#lightbox)
29+
30+
The policy definition targets resources of type "Microsoft.MachineLearningServices". When you analyze the resource ID structure of BOTH Azure Machine Learning and Azure AI Foundry, you can see the same structure:
31+
32+
- Azure Machine Learning: /subscriptions/\<subscriptionID>/resourceGroups/\<RG-name>/providers/Microsoft.MachineLearningServices/workspaces/ContosoML
33+
- Azure AI Foundry: /subscriptions/\<subscriptionID>/resourceGroups/\<RG-name>/providers/Microsoft.MachineLearningServices/workspaces/ContosoAIFoundryDemo
34+
35+
The result is both resources are affected by these policy definitions, unless an explicit exclusion is in place.
36+
37+
Consider the following best practices when managing Azure Policy:
38+
39+
- Granular scoping: Assign policies at the appropriate scope to balance control and flexibility. For example, apply at the subscription level to control all resources in the subscription, or apply at the resource group level to control resources in a specific group.
40+
- Policy naming: Use a consistent naming convention for policy assignments to make it easier to identify the purpose of the policy. Include information such as the purpose and scope in the name.
41+
- Documentation: Keep records of policy assignments and configurations for auditing purposes. Document any changes made to the policy over time.
42+
- Regular reviews: Periodically review policy assignments to ensure they align with your organization's requirements.
43+
- Testing: Test policies in a nonproduction environment before applying them to production resources.
44+
- Communication: Make sure developers are aware of the policies in place and understand the implications for their work.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
To apply a policy definition to an Azure AI service:
2+
3+
> [!NOTE]
4+
> For the example below, Azure OpenAI is used as the target resource. This process can be used for any other Azure AI service. This process can also be used for Azure Machine Learning and Azure AI Foundry by changing the target of your policy definition.
5+
6+
1. On the Azure portal, select the Search resources, services, and docs option at the top and type Policy.
7+
1. Select the Policy icon in the results.
8+
1. On the left-hand side menu, select Compliance.
9+
1. On the Compliance page, select Assign policy.
10+
1. On the scope, select the scope to which you want to assign this policy. You can select, for example, a Resource Group.
11+
1. Under Basics, select the ellipsis to select the Policy definition.
12+
1. Type "Azure ai service" in the search and select "Azure AI Services resources should restrict network access". Select Add.
13+
1. For this implementation, we use the default settings. Select Review + Create and select Create.
14+
1. You receive a notification Creating policy assignment succeeded, which notes that it takes 5-15 minutes for it to take effect.
15+
1. Once the policy is in effect, you can check out the status of the policy you deployed on the Compliance page.
16+
1. Select the policy Azure AI Services resources should restrict network access.
17+
1. On the policy page, scroll down to check which resource is in noncompliant state:
18+
19+
[![A screenshot of the Azure portal showing the results of a policy assessment](../media/policy-assessment.svg)](../media/policy-assessment-big.svg#lightbox)
20+
21+
Azure Policy evaluates the state of a resource to enforce organizational standards and to assess compliance. You can apply the following list of built-in policies to Azure AI services directly from the Azure portal:
22+
23+
| **Name** | **Description** |
24+
|---|---|
25+
| **Azure AI Services resources should encrypt data at rest with a customer-managed key (CMK)** | Using customer-managed keys to encrypt data at rest provides more control over the key lifecycle, including rotation and management. This is relevant for organizations with related compliance requirements. This isn't assessed by default and should only be applied when required by compliance or restrictive policy requirements. If not enabled, the data is encrypted using platform-managed keys. To implement this, update the 'Effect' parameter in the Security Policy for the applicable scope. |
26+
| **Azure AI Services resources should have key access disabled (disable local authentication)** | Key access (local authentication) is recommended to be disabled for security. Azure OpenAI Studio, typically used in development/testing, requires key access and won't function if key access is disabled. After disabling, Microsoft Entra ID becomes the only access method, which allows maintaining minimum privilege principle and granular control. |
27+
| **Azure AI Services resources should restrict network access** | By restricting network access, you can ensure that only allowed networks can access the service. This can be achieved by configuring network rules so that only applications from allowed networks can access the Azure AI service. |
28+
| **Azure AI Services resources should use Azure Private Link** | Azure Private Link lets you connect your virtual network to Azure services without a public IP address at the source or destination. The Private Link platform reduces data leakage risks by handling the connectivity between the consumer and services over the Azure backbone network. |
29+
| **Cognitive Services accounts should use a managed identity** | Assigning a managed identity to your Cognitive Service account helps ensure secure authentication. This identity is used by this Cognitive service account to communicate with other Azure services, like Azure Key Vault, in a secure way without you having to manage any credentials. |
30+
| **Cognitive Services accounts should use customer owned storage** | Use customer owned storage to control the data stored at rest in Cognitive Services. |
31+
| **Configure Azure AI Services resources to disable local key access (disable local authentication)** | Key access (local authentication) is recommended to be disabled for security. Azure OpenAI Studio, typically used in development/testing, requires key access and won't function if key access is disabled. After disabling, Microsoft Entra ID becomes the only access method, which allows maintaining minimum privilege principle and granular control. |
32+
| **Configure Cognitive Services accounts to disable local authentication methods** | Disable local authentication methods so that your Cognitive Services accounts require Microsoft Entra identities exclusively for authentication. |
33+
| **Configure Cognitive Services accounts to disable public network access** | Disable public network access for your Cognitive Services resource so that it's not accessible over the public internet. This can reduce data leakage risks. |
34+
| **Configure Cognitive Services accounts with private endpoints** | Private endpoints connect your virtual networks to Azure services without a public IP address at the source or destination. By mapping private endpoints to Cognitive Services, you reduce the potential for data leakage. |
35+
| **Diagnostic logs in Azure AI services resources should be enabled** | Enable logs for Azure AI services resources. This enables you to recreate activity trails for investigation purposes, when a security incident occurs or your network is compromised |
36+
| **Enable logging by category group for Cognitive Services (microsoft.cognitiveservices/accounts) to Event Hub** | Resource logs should be enabled to track activities and events that take place on your resources and give you visibility and insights into any changes that occur. This policy deploys a diagnostic setting using a category group to route logs to an Event Hubs for Cognitive Services (microsoft.cognitiveservices/accounts). |
37+
| **Enable logging by category group for Cognitive Services (microsoft.cognitiveservices/accounts) to Log Analytics** | Resource logs should be enabled to track activities and events that take place on your resources and give you visibility and insights into any changes that occur. This policy deploys a diagnostic setting using a category group to route logs to a Log Analytics workspace for Cognitive Services (microsoft.cognitiveservices/accounts). |
38+
| **Enable logging by category group for Cognitive Services (microsoft.cognitiveservices/accounts) to Storage** | Resource logs should be enabled to track activities and events that take place on your resources and give you visibility and insights into any changes that occur. This policy deploys a diagnostic setting using a category group to route logs to a Storage Account for Cognitive Services (microsoft.cognitiveservices/accounts). |
39+
40+
Alternatively, you can leverage Regulatory Compliance in Azure Policy, which provides Microsoft-created and managed initiative definitions for the compliance domains and security controls related to different compliance standards, such as FedRAMP, SOC, and others.

0 commit comments

Comments
 (0)