AI services account has local (API key) authentication disabled
aiservices_account_local_auth_disabled
Azure AI services accounts (including Azure OpenAI and Azure AI Foundry) accept static API keys unless disableLocalAuth is true. With local authentication disabled, every request must use a Microsoft Entra ID token.
Risk
Static API keys never expire and carry no caller identity:
- Confidentiality: a leaked key grants full data-plane access to models and data
- Accountability: requests cannot be traced to a user or workload
- Control: Conditional Access, RBAC scoping, and token lifetimes do not apply to keys
prowler azure --checks aiservices_account_local_auth_disabled
Recommendation
Set disableLocalAuth to true and authenticate clients with managed identities or service principals through Microsoft Entra ID. Grant least-privilege roles such as Cognitive Services OpenAI User instead of sharing keys.
Remediation
az resource update --ids <account_resource_id> --set properties.disableLocalAuth=true
- Move every client to Microsoft Entra ID authentication (managed identity or service principal with the Cognitive Services User role)
- Run the Azure CLI command above, or deploy the Bicep or Terraform example
- Confirm that requests sent with an API key now return 401
Source Code
Resource Type
microsoft.cognitiveservices/accounts