azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Cannot delete role assignment with roleAssignmentScheduleRequests - outdated api version

Open alk-automize opened this issue 3 years ago • 4 comments

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az role assignment delete

Errors:

The resource type 'roleAssignmentScheduleRequests' could not be found in the namespace 'Microsoft.Authorization' for api version '2020-04-01-preview'. The supported api-versions are '2020-10-01-preview,2020-10-01,2022-04-01-preview'.

To Reproduce:

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

  • az role assignment delete --subscription <subscription name> --ids /subscriptions/<subscription id>/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/<role assignment id>

Expected Behavior

Delete the role assignment

Environment Summary

macOS-12.5.1-x86_64-i386-64bit, Darwin 21.6.0
Python 3.10.6
Installer: HOMEBREW

azure-cli 2.40.0

Extensions:
containerapp 0.3.1

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Additional Context

alk-automize avatar Sep 21 '22 10:09 alk-automize

@jiasli for awareness

yonzhan avatar Sep 21 '22 11:09 yonzhan

roleAssignmentScheduleRequests resource type is not supported by az role assignment delete. Only roleAssignments is supported, such as

/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Authorization/roleAssignments/c9b4c87a-448f-48f5-89c8-5b10a11ffc31

jiasli avatar Sep 22 '22 06:09 jiasli

Then it was too good to be true. I was hoping PIM configuration had finally made it into CLI.

The error message is misleading. It should say something like "The resource type 'roleAssignmentScheduleRequests' is invalid"

alk-automize avatar Sep 22 '22 07:09 alk-automize

Thank you for your feedback. This has been routed to the support team for assistance.

ghost avatar Sep 22 '22 11:09 ghost