Skip to content

az policy assignment show complains about assignment name length #10176

@itaylaufer

Description

@itaylaufer

This is autogenerated. Please review and update as needed.

Describe the bug

Policy that was assigned in the portal and was assigned correctly failed to show in cli.

Command Name
az policy assignment show

Errors:

InvalidPolicyAssignmentName - The policy assignment name 'Audit virtual machines without disaster recovery configured' is invalid. The policy assignment name length must not exceed '24' characters.

To Reproduce:

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

  1. I've assigned an existing Azure policy in the portal to a management-group.
  2. I chose the 'Audit virtual machines without disaster recovery configured' policy and called the assignment name 'Audit virtual machines without disaster recovery configured'
  3. ran 'az policy assignment show --name "Audit virtual machines without disaster recovery configured"' and got the error 'InvalidPolicyAssignmentName - The policy assignment name 'Audit virtual machines without disaster recovery configured' is invalid. The policy assignment name length must not exceed '24' characters.'
  • Put any pre-requisite steps here...
  • az policy assignment show --name {}

Expected Behavior

Environment Summary

Darwin-18.0.0-x86_64-i386-64bit
Python 3.7.4
Shell: bash

azure-cli 2.0.70

Additional Context

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions