Skip to content

az role assignment list - Failed to query xxxxxxxx by invoking Graph API #30672

@helannivas

Description

@helannivas

Describe the bug

Hi,

I'm writing a cli command to list all the roles assigned under a user managed identity by running the below command

az role assignment list --assignee

but Im getting a warning as

Failed to query xxxxxxxx by invoking Graph API.If you dont have permission to query Graph API, please specifu --assignee-object-d and -assignee-principal-type

I tried running with --all parameter

az role assignment list --all

where I got output for all roles under each principalId.

I need to get the list for individual Principal Id. Please let me know what level of permission Im lagging to running this query

az role assignment list --assignee

Related command

az role assignment list --assignee
az role assignment list --all

Errors

Failed to query xxxxxxxx by invoking Graph API.If you dont have permission to query Graph API, please specifu --assignee-object-d and -assignee-principal-type

Issue script & Debug output

Failed to query xxxxxxxx by invoking Graph API.If you dont have permission to query Graph API, please specifu --assignee-object-d and -assignee-principal-type

Expected behavior

Output of roles assigned to user managed identity

Environment Summary

azure cli Version : 2.249.8

Additional context

No response

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamPossible-SolutionRBACaz roleSimilar-Issuecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions