[ARM] az policy definition version create fails with undocumented feature gate for custom definitions

Aperta
#33,890 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@isra-fel ci sta già lavorando.

Dal 13/8/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

ARM Azure CLI Team question
Describe the bug

az policy definition version create cannot create a version for a custom policy definition in my AzureCloud subscription. The service says the feature is disabled in this environment.

This does not appear to be a CLI syntax, RBAC, scope, or API-version issue:

  • Creating the root custom definition with --version 1.0.0 succeeds.
  • The caller is Owner.
  • The failure is identical at subscription and management-group scope.
  • Direct REST calls return the same error.
  • The stable REST API documents policyType: Custom, but I cannot find a feature-registration or enrollment step.
Related command
az policy definition create \
  --name <definition-name> \
  --display-name "Policy versioning repro" \
  --rules policy-rules.json \
  --version 1.0.0

az policy definition version create \
  --name <definition-name> \
  --version 1.1.0 \
  --display-name "Policy versioning repro" \
  --rules policy-rules.json
Errors
(InvalidPolicyDefinitionVersionRequest) Creating policy definition versions is currently disabled in this environment. Please contact support for any questions.

Updating the root definition from version 1.0.0 to 1.1.0 also fails:

(InvalidVersionIdentifier) Changing the value of the 'version' property is not yet supported in this environment.
Issue script & Debug output

The request reaches Microsoft.Authorization/policyDefinitions/versions/write and passes authorization. I also tested the REST endpoint with API versions from 2023-04-01 through 2026-01-01-preview; all return the same service-side error. az feature list shows no relevant registration feature.

Subscription, tenant, and request identifiers are omitted from this public issue.

Expected behavior

Please clarify how a customer subscription can use this command:

  • If custom policy-definition versioning is generally available, what enables it in a subscription where it is currently disabled?
  • If it is allowlisted or preview-only, what is the enrollment path?

The CLI help and REST documentation should state any rollout or enrollment requirement.

Environment Summary
azure-cli                         2.89.1
core                              2.89.1
azure-mgmt-resource               24.0.0
Python (Darwin)                   3.14.6
Cloud                             AzureCloud
Additional context
Lingua principale
Python
Stelle
4.7k
Fork
3.5k
Merge medio
4g 14h
PR unite (30g)
92

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/azure-cli

Tutte le issue di Azure/azure-cli

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.