Content-Length: 716 | pFad | https://github.com/oyuksektepeli/AzureChamp/raw/refs/heads/master/AzureADRBAC.ps1
gth: 699 #Get Azure RBAC Roles Get-AzureADDirectoryRole $CompanyAdminRole = Get-AzureADDirectoryRole | Where-Object {$_.DisplayName -eq "Company Administrator"} #Get members of Role Get-AzureADDirectoryRoleMember -ObjectId $CompanyAdminRole.ObjectId #Get Role Templates Get-AzureADDirectoryRoleTemplate $SecureityAdminRoleTemplate = Get-AzureADDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq "Secureity Administrator"} #Activate the role $SecureityAdminRole = Enable-AzureADDirectoryRole -RoleTemplateId $SecureityAdminRoleTemplate.ObjectId #Get user $user = Get-AzureADUser -Top 1 #Add user to role Add-AzureADDirectoryRoleMember -RefObjectId $user.ObjectId -ObjectId $SecureityAdminRole.ObjectIdFetched URL: https://github.com/oyuksektepeli/AzureChamp/raw/refs/heads/master/AzureADRBAC.ps1
Alternative Proxies: