Azure / Azure/azure-cli

az policy remediation create, breaking change in 2.45.0?

Open
#25,608 9 comments 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
Auto-Assign Azure CLI Team customer-reported Policy question Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
az policy remediation create

**Describe the bug**
We get an InvalidRequestContent error after the windows agent picked up the latest version of the Azure CLI.

ERROR: (InvalidRequestContent) The request content was invalid and could not be deserialized: 'Required property 'properties' not found in JSON. Path '', line 1, position 2.'.
Code: InvalidRequestContent
Message: The request content was invalid and could not be deserialized: 'Required property 'properties' not found in JSON. Path '', line 1, position 2.'.

We run the command `az policy remediation create --name -n --policy-assignment -a` in an AzureCLI@2 task with a powershell inlinescript.

**To Reproduce**
I get the same error when running this locally or trough the pipeline:
`az policy remediation create --name -n --policy-assignment -a`

**Expected behavior**
A remediation task should be created with no error.

**Environment summary**
Microsoft-hosted agents, CLI version latest (2.45.0) AzureCLI@2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.