Skip to content

az policy assignment update does not remove notScope if empty #25355

@jpucherna-cen66739

Description

@jpucherna-cen66739

Describe the bug

Today I wanted to modify one policy assignment removing all notScopes. I have one notScope left and I want to remove it. When I use argument --not-scope with empty value "" then nothing happens, no error appears but also no change appears. NotScope is not deleted.

Command Name
az policy assignment update

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • az policy assignment update -n {} --scope {} --not-scope ""

Expected Behavior

When I use empty value ("") of argument (--not-scope), all notScopes are deleted

Environment Summary

Linux-5.4.0-1101-azure-x86_64-with-glibc2.35 (Cloud Shell), CBL-Mariner/Linux
Python 3.9.14
Installer: RPM

azure-cli 2.44.1

Extensions:
change-analysis 0.1.0
ai-examples 0.2.5
ml 2.12.1
ssh 1.1.3

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional Context

Metadata

Metadata

Assignees

Labels

ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamact-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions