I’m using the Azure AZ module to try and list all users assigned to a specific role.
I have one line of code that will list all the information about a role but it’s not formatted to my desire:
Get-AzRoleAssignment -ResourceGroupName <rg_name> | Where-Object RoleDefinitionName -EQ 'owner'
I’d only like to see a few fields/objects, i.e) DisplayName, RoleDefinitionName, etc.
When I add a “pipe” with:
Select-Object DisplayName, RoleAssignmentId
, but nothing is returned.