Skip to content
Cloud Governance Tools

Configure Cognitive Services accounts to disable local authentication

Configure Cognitive Services accounts to disable local authentication is an Azure guardrail written in Azure Policy. Disables key-based (local) authentication on Cognitive Services accounts so only Microsoft Entra identities can call them. What it breaks: modify changes the property during create or update instead of rejecting the request, and existing accounts change only through a remediation task.

More ai services guardrails ยท About Azure Policy

Built-in policy definition: Configure Cognitive Services accounts to disable local authentication methods
Definition ID: 14de9e63-1b31-492e-a5a3-c3f7fd57f555
Category: Cognitive Services
Supported effects: Modify, Disabled
policyRule (copied from the repository file):
{
    "if": {
      "allOf": [
        {
          "field": "type",
          "equals": "Microsoft.CognitiveServices/accounts"
        },
        {
          "field": "Microsoft.CognitiveServices/accounts/disableLocalAuth",
          "notEquals": true
        }
      ]
    },
    "then": {
      "effect": "[parameters('effect')]",
      "details": {
        "roleDefinitionIds": [
          "/providers/microsoft.authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
        ],
        "conflictEffect": "audit",
        "operations": [
          {
            "condition": "[greaterOrEquals(requestContext().apiVersion, '2021-04-30')]",
            "operation": "addOrReplace",
            "field": "Microsoft.CognitiveServices/accounts/disableLocalAuth",
            "value": true
          }
        ]
      }
    }
  }
Blocks
Disables key-based (local) authentication on Cognitive Services accounts so only Microsoft Entra identities can call them.
Breaks
Modify changes the property during create or update instead of rejecting the request, and existing accounts change only through a remediation task. (source)
Test before applying
As for every Azure Policy guardrail: how to test before enforcing
Mechanism
Azure Policy (built-in definitions): Resources at the scope of the assignment (management group, subscription, resource group) and their children, except notScopes and exemptions
Taken from
open source set, MIT License, Azure/azure-policy repository, https://raw.githubusercontent.com/Azure/azure-policy/master/LICENSE

What the source says

"Disable local authentication methods so that your Cognitive Services accounts require Azure Active Directory identities exclusively for authentication." (read 10 Nov 2026).

What it breaks is documented for every guardrail of this mechanism: see Azure Policy.

Sources

  1. Configure Cognitive Services accounts to disable local authentication, read 10 Nov 2026
  2. What it breaks, read 10 Nov 2026
  3. How to test it first, read 10 Nov 2026

Last reviewed 16 Nov 2026.