The GET request i am making to the below API
https://management.azure.com/subscriptions/{{subscriptionId}}/providers/Microsoft.Authorization/roleAssignments?api-version=2017-10-01-preview
which gives me below format of response
{
"properties": {
"roleDefinitionId": "/subscriptions/5a9c0639-4045-4c23-8418-fc091e8d1e31/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c",
"principalId": "fdef6f38-b48f-4358-8482-b243ea935082",
"principalType": "User",
"scope": "/subscriptions/5a9c0639-4045-4c23-8418-fc091e8d1e31/resourceGroups/GE-RGrp-Kentico",
"createdOn": "2017-08-21T11:38:53.7973201Z",
"updatedOn": "2017-08-21T11:38:53.7973201Z",
"createdBy": "f418e9e8-becc-41d8-ab47-66a4c50403b5",
"updatedBy": "f418e9e8-becc-41d8-ab47-66a4c50403b5"
},
"id": "/subscriptions/5a9c0639-4045-4c23-8418-fc091e8d1e31/resourceGroups/GE-RGrp-Kentico/providers/Microsoft.Authorization/roleAssignments/5e6caac9-c5fd-42f0-86c6-9e96b127be51",
"type": "Microsoft.Authorization/roleAssignments",
"name": "5e6caac9-c5fd-42f0-86c6-9e96b127be51"
}
But when i do the CLI call i get below response using
> az role assignment list
{
"id": "/subscriptions/5a9c0639-4045-4c23-8418-fc091e8d1e31/providers/Microsoft.Authorization/roleAssignments/4096c146-b6f8-4f92-a700-a47742a5b321",
"name": "4096c146-b6f8-4f92-a700-a47742a5b321",
"properties": {
"additionalProperties": {
"createdBy": "c2024d65-cf17-45fd-b34b-09cd5c21cac7",
"createdOn": "2017-11-07T22:03:12.4998370Z",
"updatedBy": "c2024d65-cf17-45fd-b34b-09cd5c21cac7",
"updatedOn": "2017-11-07T22:03:12.4998370Z"
},
"principalId": "780925c0-a487-4529-9eb2-837aa67a4d8a",
"principalName": "xcavanap@genesisenergy.co.nz",
"roleDefinitionId": "/subscriptions/5a9c0639-4045-4c23-8418-fc091e8d1e31/providers/Microsoft.Authorization/roleDefinitions/fb1c8493-542b-48eb-b624-b4c8fea62acd",
"roleDefinitionName": "Security Admin",
"scope": "/subscriptions/5a9c0639-4045-4c23-8418-fc091e8d1e31"
},
the above response does have the
"roleDefinitionName": "Security Admin"
but i want same response through API, please Help!!