public List <RoleAssignmentDetails> ListRoleAssignments(string roleDefinitionId = null, string objectId = null, string scope = null)
        {
            List <RoleAssignmentDetails> roleAssignmentList = new List <RoleAssignmentDetails>();
            string continuationToken = null;

            do
            {
                var response        = _roleAssignmentsClient.ListRoleAssignments(roleDefinitionId, objectId, scope, continuationToken);
                var roleAssignments = response.Value.Value;
                roleAssignmentList.AddRange(roleAssignments);
                response.GetRawResponse().Headers.TryGetValue("x-ms-continuation", out continuationToken);
            }while (!string.IsNullOrWhiteSpace(continuationToken));

            return(roleAssignmentList);
        }
예제 #2
0
 public IReadOnlyList <RoleAssignmentDetails> ListRoleAssignments(string roleDefinitionId = null, string objectId = null, string scope = null)
 {
     return(_roleAssignmentsClient.ListRoleAssignments(roleDefinitionId, objectId, scope).Value.Value);
 }