# Configure Cognitive Services accounts to disable public network access

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

Configure Cognitive Services accounts to disable public network access is an Azure guardrail written in Azure Policy. Sets public network access to disabled on Cognitive Services (Azure AI services, including Azure OpenAI) accounts on create or update. Copied from a licensed open source set and read on 10 Nov 2026.

```text
Built-in policy definition: Configure Cognitive Services accounts to disable public network access
Definition ID: 47ba1dd7-28d9-4b07-a8d5-9813bed64e0c
Category: Cognitive Services
Supported effects: Disabled, Modify
policyRule (copied from the repository file):
{
    "if": {
      "allOf": [
        {
          "field": "type",
          "equals": "Microsoft.CognitiveServices/accounts"
        },
        {
          "field": "Microsoft.CognitiveServices/accounts/publicNetworkAccess",
          "notEquals": "Disabled"
        }
      ]
    },
    "then": {
      "effect": "[parameters('effect')]",
      "details": {
        "roleDefinitionIds": [
          "/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
        ],
        "conflictEffect": "audit",
        "operations": [
          {
            "condition": "[greaterOrEquals(requestContext().apiVersion, '2017-04-18')]",
            "operation": "addOrReplace",
            "field": "Microsoft.CognitiveServices/accounts/publicNetworkAccess",
            "value": "Disabled"
          }
        ]
      }
    }
  }
```

- **Blocks:** Sets public network access to disabled on Cognitive Services (Azure AI services, including Azure OpenAI) accounts on create or update.
- **Breaks:** Modify changes the property during create or update instead of rejecting the request, and existing accounts change only through a remediation task. ([source](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effect-modify))
- **Test before applying:** As for every Azure Policy guardrail: [how to test before enforcing](/mechanisms/azure-policy/)
- **Mechanism:** [Azure Policy (built-in definitions)](/mechanisms/azure-policy/): Resources at the scope of the assignment (management group, subscription, resource group) and their children, except notScopes and exemptions
- **Taken from:** [open source set](https://raw.githubusercontent.com/Azure/azure-policy/master/built-in-policies/policyDefinitions/Cognitive%20Services/DisablePublicNetworkAccess_Modify.json), MIT License, Azure/azure-policy repository, https://raw.githubusercontent.com/Azure/azure-policy/master/LICENSE

## What the source says

"Disable public network access for your Cognitive Services resource so that it's not accessible over the public internet." (read 10 Nov 2026).

What it breaks is documented for every guardrail of this mechanism: see [Azure Policy](/mechanisms/azure-policy/).

## Related guardrails

- [Region deny that allows Bedrock cross-Region inference](/guardrails/aws-scp-region-deny-with-bedrock-cris/): AWS, Service control policies (SCPs), ai services
- [Allow only approved Amazon Bedrock models](/guardrails/aws-scp-bedrock-approved-models-only/): AWS, Service control policies (SCPs), ai services
- [Deny Amazon Bedrock API keys](/guardrails/aws-scp-deny-bedrock-api-keys/): AWS, Service control policies (SCPs), ai services
- [Configure Cognitive Services accounts to disable local authentication](/guardrails/azure-policy-ai-disable-local-auth/): Azure, Azure Policy (built-in definitions), ai services
- [Configure Azure AI Services resources to disable local key access](/guardrails/azure-policy-ai-disable-local-auth-dine/): Azure, Azure Policy (built-in definitions), ai services
- [Configure Azure Machine Learning workspaces to disable public network access](/guardrails/azure-policy-ml-workspace-disable-public-network/): Azure, Azure Policy (built-in definitions), ai services

## Related pages

- [Configure Cognitive Services accounts to disable local authentication (Azure Azure Policy)](/guardrails/azure-policy-ai-disable-local-auth/)
- [Configure Azure AI Services resources to disable local key access (Azure Azure Policy)](/guardrails/azure-policy-ai-disable-local-auth-dine/)
- [Configure Azure Machine Learning workspaces to disable public network access (Azure Azure Policy)](/guardrails/azure-policy-ml-workspace-disable-public-network/)

## Sources

- Configure Cognitive Services accounts to disable public network access: https://raw.githubusercontent.com/Azure/azure-policy/master/built-in-policies/policyDefinitions/Cognitive%20Services/DisablePublicNetworkAccess_Modify.json (read 10 Nov 2026)
- What it breaks: https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effect-modify (read 10 Nov 2026)
- How to test it first: https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudgovernancetools.com/guardrails/azure-policy-ai-disable-public-network/
