MicrosoftLearning / AZ-104-MicrosoftAzureAdministrator

AZ-104 Microsoft Azure Administrator
https://microsoftlearning.github.io/AZ-104-MicrosoftAzureAdministrator/
MIT License
3.63k stars 4.03k forks source link

Lab 02a - Manage Subscriptions and RBAC #154

Closed siwon closed 4 years ago

siwon commented 4 years ago

Module: Manage Subscriptions and RBAC

Lab/Demo: 02a

Task: Cleanup

Step: 5

Hi,

This command didn't work during our classroom : https://github.com/MicrosoftLearning/AZ-104-MicrosoftAzureAdministrator/blob/43dd206716443eb3b31d198b0018e5d380c6cdd0/Instructions/Labs/LAB_02a_Manage_Subscriptions_and_RBAC.md#L156-L160

This command worked :

Get-AzRoleAssignment -RoleDefinitionName 'Support Request Contributor (Custom)'

This command worked :

Remove-AzRoleAssignment -ObjectId '[object_ID]' -RoleDefinitionName 'Support Request Contributor (Custom)' -Scope '/providers/Microsoft.Management/managementGroups/az104-02-mg1'

But not this one :

Remove-AzRoleAssignment -ObjectId '[object_ID]' -RoleDefinitionName 'Support Request Contributor (Custom)' -Scope $scope

We thought of a reserved word : scope. Maybe just need to be changed to scopes ?

Have a nice day.

Simon

polichtm commented 4 years ago

Hi Simon, Pls post the output of (Get-AzRoleAssignment -RoleDefinitionName 'Support Request Contributor (Custom)').Scope rgds Marcin

siwon commented 4 years ago

Hi @polichtm,

I'm sorry, I cannot reproduce (even after replaying the lab) but there is a new problem.

Now the command Get-AzRoleAssignment -RoleDefinitionName 'Support Request Contributor (Custom)' is empty (while it wasn't in my memories)

Command Get-AzRoleAssignment -Scope /providers/Microsoft.Management/managementGroups/az104-02-mg1 returns :

RoleAssignmentId   : /providers/Microsoft.Management/managementGroups/az104-02-mg1/providers/Microsoft.Authorization/roleAssignments/********************************
Scope              : /providers/Microsoft.Management/managementGroups/az104-02-mg1
DisplayName        : ********************************
SignInName         : ********************************
RoleDefinitionName : Owner
RoleDefinitionId   : ********************************
ObjectId           : ********************************
ObjectType         : User
CanDelegate        : False
Description        :
ConditionVersion   :
Condition          :

RoleAssignmentId   : /providers/Microsoft.Management/managementGroups/az104-02-mg1/providers/Microsoft.Authorization/roleAssignments/********************************
Scope              : /providers/Microsoft.Management/managementGroups/az104-02-mg1
DisplayName        : az104-02-aaduser1
SignInName         : az104-02-aaduser1@********************************.onmicrosoft.com
RoleDefinitionName : Support Request Contributor (Custom)
RoleDefinitionId   : ********************************
ObjectId           : ********************************
ObjectType         : User
CanDelegate        : False
Description        :
ConditionVersion   :
Condition          :
polichtm commented 4 years ago

Hi Simon, Pls post the output of Get-AzRoleAssignment rgds Marcin

polichtm commented 4 years ago

closing due to lack of response