[QUERY]how to get role assignment with scope "/"
See original GitHub issueQuery/Question A clear and concise ask/query. Query/Question How can we help? how to get role assignment with scope “/”. It seems .RoleAssignments.ListByScopeAsyncor other method are not support scope “/”.
var tokenCredentials = new TokenCredentials(armToken);
var authenticated = Azure
.Configure()
.WithLogLevel(HttpLoggingDelegatingHandler.Level.Basic)
.Authenticate(new AzureCredentials(
tokenCredentials,
tokenCredentials,
organizationId,
AzureEnvironment.AzureGlobalCloud));
var roledefinition = await authenticated.RoleDefinitions.GetByScopeAndRoleNameAsync("/", BuiltInRole.UserAccessAdministrator.ToString());
var roleAssignments = await authenticated.RoleAssignments.ListByScopeAsync("/");
now I can only get that from api: https://management.azure.com/providers/Microsoft.Authorization/roleAssignments?api-version=2015-07-01&$filter=principalId eq ‘***’ Why is this not a Bug or a feature Request? A clear explanation of why is this not a bug or a feature request?
Setup (please complete the following information if applicable):
- OS: [e.g. iOS]
- IDE : [e.g. IntelliJ]
- Version of the Library used
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Query Added
- Setup information Added
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
List Azure role assignments using the Azure portal
List role assignments at a scope · In the Azure portal, click All services and then select the scope. · Click the specific...
Read more >Get-AzRoleAssignment (Az.Resources)
Use the Get-AzRoleAssignment command to list all role assignments that are effective on a scope. Without any parameters, this command returns all the...
Read more >[QUERY]how to get role assignment with scope "/" #14127
I try to use another method to get role assginment: var roleAssignments = await authenticated.RoleAssignments.GetByIdAsync(roledefinition.Id);
Read more >How to get the role assignments of a resource through ...
I want to use the Azure Resource Graph API to get the role assignments of a resource (who are owners, contributors, etc.). That...
Read more >Get all role assignments of an Azure AD Principal
Apart from iterating through 50 subscriptions, fetching role assignments per scope and then comparing object id, is there any better way?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Emma0727 I only find ListForScope, ListForResource, ListForResourceGroup.
@Emma0727 Thanks for sharing. You may try
authenticated.RoleAssignments.Inner.ListByScopeAsync
instead ofauthenticated.RoleAssignments.ListByScopeAsync
. It would allow you to send with filters.