This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Assign Azure roles using the Azure portal

Azure role-based access control (Azure RBAC) is the authorization system you use to manage access to Azure resources. To grant access, you assign roles to users, groups, service principals, or managed identities at a particular scope. This article describes how to assign roles using the Azure portal.

If you need to assign administrator roles in Azure Active Directory, see Assign Azure AD roles to users .

Prerequisites

To assign Azure roles, you must have:

Step 1: Identify the needed scope

When you assign roles, you must specify a scope. Scope is the set of resources the access applies to. In Azure, you can specify a scope at four levels from broad to narrow: management group , subscription, resource group , and resource. For more information, see Understand scope .

Diagram that shows the scope levels for Azure RBAC.

Sign in to the Azure portal .

In the Search box at the top, search for the scope you want to grant access to. For example, search for Management groups , Subscriptions , Resource groups , or a specific resource.

Click the specific resource for that scope.

The following shows an example resource group.

Screenshot of resource group overview page.

Step 2: Open the Add role assignment page

Access control (IAM) is the page that you typically use to assign roles to grant access to Azure resources. It's also known as identity and access management (IAM) and appears in several locations in the Azure portal.

Click Access control (IAM) .

The following shows an example of the Access control (IAM) page for a resource group.

Screenshot of Access control (IAM) page for a resource group.

Click the Role assignments tab to view the role assignments at this scope.

Click Add > Add role assignment .

If you don't have permissions to assign roles, the Add role assignment option will be disabled.

Screenshot of Add > Add role assignment menu.

The Add role assignment page opens.

Step 3: Select the appropriate role

On the Roles tab, select a role that you want to use.

You can search for a role by name or by description. You can also filter roles by type and category.

Screenshot of Add role assignment page with Roles tab.

In the Details column, click View to get more details about a role.

Screenshot of View role details pane with Permissions tab.

Click Next .

Step 4: Select who needs access

On the Members tab, select User, group, or service principal to assign the selected role to one or more Azure AD users, groups, or service principals (applications).

Screenshot of Add role assignment page with Members tab.

Click Select members .

Find and select the users, groups, or service principals.

You can type in the Select box to search the directory for display name or email address.

Screenshot of Select members pane.

Click Select to add the users, groups, or service principals to the Members list.

To assign the selected role to one or more managed identities, select Managed identity .

In the Select managed identities pane, select whether the type is user-assigned managed identity or system-assigned managed identity .

Find and select the managed identities.

For system-assigned managed identities, you can select managed identities by Azure service instance.

Screenshot of Select managed identities pane.

Click Select to add the managed identities to the Members list.

In the Description box enter an optional description for this role assignment.

Later you can show this description in the role assignments list.

Step 5: (Optional) Add condition (preview)

If you selected a role that supports conditions, a Conditions (optional) tab will appear and you have the option to add a condition to your role assignment. A condition is an additional check that you can optionally add to your role assignment to provide more fine-grained access control.

Currently, conditions can be added to built-in or custom role assignments that have storage blob data actions . These include the following built-in roles:

Click Add condition if you want to further refine the role assignments based on storage blob attributes. For more information, see Add or edit Azure role assignment conditions .

Screenshot of Add role assignment page with Add condition tab.

Step 6: Assign role

On the Review + assign tab, review the role assignment settings.

Screenshot of Assign a role page with Review + assign tab.

Click Review + assign to assign the role.

After a few moments, the security principal is assigned the role at the selected scope.

Screenshot of role assignment list after assigning role.

If you don't see the description for the role assignment, click Edit columns to add the Description column.

Submit and view feedback for

Additional resources

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Not able to create AKS with role assignment write for subnet and ACR registry in Azure Cloud

AKS creation issue

My user id does not have sufficient permissions to perform this action. Only with basic network settings and no ACR binding, I can create AKS cluster. Which role, at Active Directory (AD) level and at subscription level, should my user id be having to create this AKS service?

Prakashsinha Bayas's user avatar

You don't need any permissions on Azure AD level for this to work, but you need Microsoft.Authorization/roleAssignments/write permissions on the adequate scopes to be able to assign permissions. A built-in role of Owner grants that. Otherwise - create a custom role and assign that to your user.

4c74356b41's user avatar

Your Answer

Sign up or log in, post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged azure azure-active-directory subscription azure-aks or ask your own question .

Hot Network Questions

subnet role assignment

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

Stack Exchange Network

Stack Exchange network consists of 181 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Azure custom permissions on subnet

We have a VNET that is coupled to an Express route, on which we will give our users access to specific subnets.

These subnets are created for each resource group, and the idea is to have these users only able to add machines in their subnet. To allow users to add machines to a subnet I gave them the following permissions:

However this allowed the users to select all subnets on the virtual network. It simply throws an error when you try to deploy a machine on a subnet you lack contributor on.

I tried creating custom roles, but if I am to create one that only disallows reading as such:

I get the error:

I assume this is because the actions value can not be empty. I'm not sure what I should/could safely add in the actions, and at this point it's starting to look like I'm putting together something complex for what should be quite simple.

So how should I set up/create roles to allow for a user to see and utilize only a single subnet within a larger VNET?

Reaces's user avatar

We can not put restrictions on a specific subnet. I had the same issue.

The custom rules can only be applied on 1) Resource Groups 2) Resource (vnet is a resource and not subnets, subnets are the outcome of a resource) 3) Subscription

As explained, subnets are not resources and you will not be able to restrict which subnets can and cannot be used, via RBAC/Custom roles feature.

You might have to look into Azure Blueprints or Azure policies for that.

Animesh Badjatya's user avatar

Your Answer

Sign up or log in, post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged permissions powershell azure or ask your own question .

Hot Network Questions

subnet role assignment

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

subnet role assignment

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roleAssignments on subnet for AKS network contributer #1972

@dirien

dirien commented Mar 23, 2021

@msftbot

anthony-c-martin commented Mar 23, 2021

Sorry, something went wrong.

dirien commented Mar 25, 2021

@dirien

No branches or pull requests

@dirien

IMAGES

  1. Allocate Address Space for the OfficeNet and ManagementNet using the Graphical Subnet Chart

    subnet role assignment

  2. Subnet a /16 and a /8 Prefix » CCNA 200-301

    subnet role assignment

  3. Introduction to DHCP (Dynamic host configuration protocol)

    subnet role assignment

  4. Routing-subnet addressing.pptx

    subnet role assignment

  5. Role of Subnet Mask

    subnet role assignment

  6. Lesson 22

    subnet role assignment

VIDEO

  1. Twisted Wonderland English Version: A Beautiful Tyrant Part 26

  2. Role Playing Assignment 1

  3. ROLE PLAY VIDEO ASSIGNMENT SWU193 B46 A5

  4. MKTG-3315: Role-Playing Assignment 1

  5. ROLE PLAY 2

  6. SSD_ASSIGNMENT_GROUP NO 12_ROLE PLAY

COMMENTS

  1. Add, change, or delete an Azure virtual network subnet

    To do tasks on subnets, your account must be assigned to the Network contributor role or to a Custom role that's assigned the appropriate actions in the following table: Next steps Create a virtual network and subnets using PowerShell or Azure CLI sample scripts, or using Azure Resource Manager templates

  2. Assign Azure roles using the Azure portal

    Assign Azure roles using the Azure portal Article 09/28/2022 3 minutes to read 4 contributors Feedback In this article Prerequisites Step 1: Identify the needed scope Step 2: Open the Add role assignment page Step 3: Select the appropriate role Show 4 more

  3. Warning, when provisioning AKS with custom subnet. #614

    And the command just shows Could not create a role assignment for subnet. Are you an Owner on this subscription? instead of showing the root issue. I've made the subnet range bigger, then an AKS cluster creation succeeded, but still the message Could not create a role assignment for subnet.

  4. Not able to create AKS with role assignment write for subnet

    1 You don't need any permissions on Azure AD level for this to work, but you need Microsoft.Authorization/roleAssignments/write permissions on the adequate scopes to be able to assign permissions. A built-in role of Owner grants that. Otherwise - create a custom role and assign that to your user. Share Follow answered Jun 23, 2020 at 7:42

  5. powershell

    These subnets are created for each resource group, and the idea is to have these users only able to add machines in their subnet. To allow users to add machines to a subnet I gave them the following permissions: Read on Virtual Network Contributor on their subnet However this allowed the users to select all subnets on the virtual network.

  6. roleAssignments on subnet for AKS network contributer #1972

    roleAssignments on subnet for AKS network contributer #1972 Closed dirien opened this issue on Mar 22, 2021 · 2 comments dirien commented on Mar 22, 2021 Create a virtual network with a subnet inside for the AKS agentpool subnet Create an AKS Cluster msftbot bot added the Needs: Triage label on Mar 22, 2021