How To Add User To Azure Resource Group

Recently, I got a requirement to add a few users to one of my critical Azure Resource Groups. In this article, I will walk you through all the steps on how to add user to Resource Group in Azure.

How To Add User To Azure Resource Group

Let us discuss a few simple approaches to do this.

Approach-1: Using Azure Portal

To add user to Azure Resource Group, follow the below steps.

1. Log in to Azure Portal.

2. Search for Resource Groups and click on the search result Resource Groups under Services, as shown below.

Add user to azure resource group

3. Now, click on the specific Resource Group to the one you wish to add the user.

add user to resource group in azure

4. On the specific Resource Group page, Click on the Access Control (IAM) link from the left navigation, and then click on the Add role assignment option from the + Add drop-down, as shown in the screenshot below.

how to add user to resource group in azure

5. Now, select the respective Role from the list and click the Next button as shown below.

add a user to a resource group in azure

6. On the Members tab, Select Assign access to option as User,groups or service principal and then click on the + Select members option. Now, search for and select the user from the list and then click on the Select button, as shown in the screenshot below.

How To Add User To Azure Resource Group

7. Now that the respective member is selected, click on the Next button.

how to add a user to a resource group in azure

8. Now, click on the Review + assign button.

add a user to Azure resource group

Now, the selected user has been added to the Azure Resource Group successfully as shown in the screenshot below.

How to add a user to Azure resource group

Approach-2: Using PowerShell

We can also use the PowerShell command to achieve this. Follow the below steps.

1. Open Windows PowerShell ISE with Run as administrator mode.

how to add user to azure resource group powershell

2. Now, execute the below command to connect to your Azure account.

Connect-AzAccount
how to add user to resource group in azure PowerShell

3. Finally, execute the below PowerShell command to add the specified user to the Azure Resource Group.

New-AzRoleAssignment -SignInName "fewlines4biju_hotmail.com#EXT#@fewlines4bijuhotmail.onmicrosoft.com" `
                     -RoleDefinitionName "Contributor" `
                     -ResourceGroupName "newresgroup"

After executing the above command, the user was added successfully to the specified Resource Group, as shown in the screenshot below.