Azure-docs: The example JSON should follow the REST spec

Created on 24 Apr 2020  Â·  7Comments  Â·  Source: MicrosoftDocs/azure-docs

The example JSON should follow the Role Definitions - Create Or Update REST API spec, and also use camelCase, instead of PascalCase.

These properties don't match their REST equivalents:

"Name": "Virtual Machine Operator",
"Id": "88888888-8888-8888-8888-888888888888",

The mapping is

| This doc | REST spec | Definition
|----------|---------------------|-------------
| Name | properties.roleName | The literal name, like Virtual Machine Operator
| Id | name | A GUID, like 6134dd49-621f-4c59-94db-a56b3f7e45f8
| - | id | A resource ID, like /subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/6134dd49-621f-4c59-94db-a56b3f7e45f8

This causes lots of confusions, including the help messages from az role definition create --help and az role definition update --help which follow this doc but don't comply with the REST spec.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 assigned-to-author product-question role-based-access-controsvc triaged

All 7 comments

@jiasli Thanks for your comment. We are actively investigating and will get back to you shortly.

The inconsistency also caused the confusion at https://github.com/MicrosoftDocs/azure-docs/issues/34334. We should stick with the new ARM style and eliminate the unnecessary manual transformation.

@jiasli Thanks for analysis and valuable feedback.

@rolyon Can you please review the issue and update the document accordingly?

Hi @jiasli
Thanks for your feedback. This example shows the capping for PowerShell, which most customers use. I will update the docs to make this more clear.
thanks

Hi @jiasli
We published a doc update that hopefully makes this more clear.
https://docs.microsoft.com/en-us/azure/role-based-access-control/custom-roles
If you have any additional feedback, feel free to reopen this issue.
thanks

please-close

@rolyon, the update looks great! Azure CLI will switch to the one in REST spec in the future. At least, it is now clearer for the users.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ponant picture Ponant  Â·  3Comments

AronT-TLV picture AronT-TLV  Â·  3Comments

ianpowell2017 picture ianpowell2017  Â·  3Comments

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments

varma31 picture varma31  Â·  3Comments