Create or update Azure custom roles using the Azure portal - Azure RBAC (2023)

  • Article
  • 9 minutes to read

If the Azure built-in roles don't meet the specific needs of your organization, you can create your own Azure custom roles. Just like built-in roles, you can assign custom roles to users, groups, and service principals at management group (in preview only), subscription and resource group scopes. Custom roles are stored in an Azure Active Directory (Azure AD) directory and can be shared across subscriptions. Each directory can have up to 5000 custom roles. Custom roles can be created using the Azure portal, Azure PowerShell, Azure CLI, or the REST API. This article describes how to create custom roles using the Azure portal.

Prerequisites

To create custom roles, you need:

  • Permissions to create custom roles, such as Owner or User Access Administrator

Step 1: Determine the permissions you need

Azure has thousands of permissions that you can potentially include in your custom role. Here are some methods that can help you determine the permissions you will want to add to your custom role:

  • Look at existing built-in roles.
  • List the Azure services you want to grant access to.
  • Determine the resource providers that map to the Azure services. A search method is described later in Step 4: Permissions.
  • Search the available permissions to find permissions you want to include. A search method is described later in Step 4: Permissions.

Step 2: Choose how to start

There are three ways that you can start to create a custom role. You can clone an existing role, start from scratch, or start with a JSON file. The easiest way is to find an existing role that has most of the permissions you need and then clone and modify it for your scenario.

Clone a role

If an existing role does not quite have the permissions you need, you can clone it and then modify the permissions. Follow these steps to start cloning a role.

  1. In the Azure portal, open a subscription or resource group where you want the custom role to be assignable and then open Access control (IAM).

    The following screenshot shows the Access control (IAM) page opened for a subscription.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (1)

  2. Click the Roles tab to see a list of all the built-in and custom roles.

  3. Search for a role you want to clone such as the Billing Reader role.

  4. At the end of the row, click the ellipsis (...) and then click Clone.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (2)

    This opens the custom roles editor with the Clone a role option selected.

  5. Proceed to Step 3: Basics.

Start from scratch

If you prefer, you can follow these steps to start a custom role from scratch.

  1. In the Azure portal, open a subscription or resource group where you want the custom role to be assignable and then open Access control (IAM).

  2. Click Add and then click Add custom role.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (3)

    This opens the custom roles editor with the Start from scratch option selected.

  3. Proceed to Step 3: Basics.

    (Video) Microsoft Azure ☁️ Creating custom RBAC roles using the Azure portal

Start from JSON

If you prefer, you can specify most of your custom role values in a JSON file. You can open the file in the custom roles editor, make additional changes, and then create the custom role. Follow these steps to start with a JSON file.

  1. Create a JSON file that has the following format:

    { "properties": { "roleName": "", "description": "", "assignableScopes": [], "permissions": [ { "actions": [], "notActions": [], "dataActions": [], "notDataActions": [] } ] }}
  2. In the JSON file, specify values for the various properties. Here's an example with some values added. For information about the different properties, see Understand Azure role definitions.

    { "properties": { "roleName": "Billing Reader Plus", "description": "Read billing data and download invoices", "assignableScopes": [ "/subscriptions/11111111-1111-1111-1111-111111111111" ], "permissions": [ { "actions": [ "Microsoft.Authorization/*/read", "Microsoft.Billing/*/read", "Microsoft.Commerce/*/read", "Microsoft.Consumption/*/read", "Microsoft.Management/managementGroups/read", "Microsoft.CostManagement/*/read", "Microsoft.Support/*" ], "notActions": [], "dataActions": [], "notDataActions": [] } ] }}
  3. In the Azure portal, open the Access control (IAM) page.

  4. Click Add and then click Add custom role.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (4)

    This opens the custom roles editor.

  5. On the Basics tab, in Baseline permissions, select Start from JSON.

  6. Next to the Select a file box, click the folder button to open the Open dialog box.

  7. Select your JSON file and then click Open.

  8. Proceed to Step 3: Basics.

Step 3: Basics

On the Basics tab, you specify the name, description, and baseline permissions for your custom role.

  1. In the Custom role name box, specify a name for the custom role. The name must be unique for the Azure AD directory. The name can include letters, numbers, spaces, and special characters.

  2. In the Description box, specify an optional description for the custom role. This will become the tooltip for the custom role.

    The Baseline permissions option should already be set based on the previous step, but you can change.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (5)

Step 4: Permissions

On the Permissions tab, you specify the permissions for your custom role. Depending on whether you cloned a role or if you started with JSON, the Permissions tab might already list some permissions.

Create or update Azure custom roles using the Azure portal - Azure RBAC (6)

Add or remove permissions

Follow these steps to add or remove permissions for your custom role.

  1. To add permissions, click Add permissions to open the Add permissions pane.

    This pane lists all available permissions grouped into different categories in a card format. Each category represents a resource provider, which is a service that supplies Azure resources.

  2. In the Search for a permission box, type a string to search for permissions. For example, search for invoice to find permissions related to invoice.

    (Video) #Azure #RBAC #Custom Role | Az104 | Azure cloud

    A list of resource provider cards will be displayed based on your search string. For a list of how resource providers map to Azure services, see Resource providers for Azure services.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (7)

  3. Click a resource provider card that might have the permissions you want to add to your custom role, such as Microsoft Billing.

    A list of the management permissions for that resource provider is displayed based on your search string.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (8)

  4. If you are looking for permissions that apply to the data plane, click Data Actions. Otherwise, leave the actions toggle set to Actions to list permissions that apply to the control plane. For more information, about the differences between the control plane and data plane, see Control and data actions.

  5. If necessary, update the search string to further refine your search.

  6. Once you find one or more permissions you want to add to your custom role, add a check mark next to the permissions. For example, add a check mark next to Other : Download Invoice to add the permission to download invoices.

  7. Click Add to add the permission to your permission list.

    The permission gets added as an Actions or a DataActions.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (9)

  8. To remove permissions, click the delete icon at the end of the row. In this example, since a user will not need the ability to create support tickets, the Microsoft.Support/* permission can be deleted.

Add wildcard permissions

Depending on how you chose to start, you might have permissions with wildcards (*) in your list of permissions. A wildcard (*) extends a permission to everything that matches the action string you provide. For example, the following wildcard string adds all permissions related to Azure Cost Management and exports. This would also include any future export permissions that might be added.

Microsoft.CostManagement/exports/*

If you want to add a new wildcard permission, you can't add it using the Add permissions pane. To add a wildcard permission, you have to add it manually using the JSON tab. For more information, see Step 6: JSON.

Exclude permissions

If your role has a wildcard (*) permission and you want to exclude or subtract specific permissions from that wildcard permission, you can exclude them. For example, let's say that you have the following wildcard permission:

Microsoft.CostManagement/exports/*

If you don't want to allow an export to be deleted, you could exclude the following delete permission:

Microsoft.CostManagement/exports/delete

When you exclude a permission, it is added as a NotActions or NotDataActions. The effective management permissions are computed by adding all of the Actions and then subtracting all of the NotActions. The effective data permissions are computed by adding all of the DataActions and then subtracting all of the NotDataActions.

Note

Excluding a permission is not the same as a deny. Excluding permissions is simply a convenient way to subtract permissions from a wildcard permission.

  1. To exclude or subtract a permission from an allowed wildcard permission, click Exclude permissions to open the Exclude permissions pane.

    On this pane, you specify the management or data permissions that are excluded or subtracted.

    (Video) How to create custom RBAC roles in Azure

  2. Once you find one or more permissions that you want to exclude, add a check mark next to the permissions and then click the Add button.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (10)

    The permission gets added as a NotActions or NotDataActions.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (11)

Step 5: Assignable scopes

On the Assignable scopes tab, you specify where your custom role is available for assignment, such as management group, subscriptions, or resource groups. Depending on how you chose to start, this tab might already list the scope where you opened the Access control (IAM) page.

You can only define one management group in assignable scopes. Adding a management group to assignable scopes is currently in preview. Setting assignable scope to root scope ("/") is not supported.

  1. Click Add assignable scopes to open the Add assignable scopes pane.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (12)

  2. Click one or more scopes that you want to use, typically your subscription.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (13)

  3. Click the Add button to add your assignable scope.

Step 6: JSON

On the JSON tab, you see your custom role formatted in JSON. If you want, you can directly edit the JSON. If you want to add a wildcard (*) permission, you must use this tab.

  1. To edit the JSON, click Edit.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (14)

  2. Make changes to the JSON.

    If the JSON is not formatted correctly, you will see a red jagged line and an indicator in the vertical gutter.

  3. When finished editing, click Save.

Step 7: Review + create

On the Review + create tab, you can review your custom role settings.

  1. Review your custom role settings.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (15)

  2. Click Create to create your custom role.

    After a few moments, a message box appears indicating your custom role was successfully created.

    (Video) How to Create or update Azure Custom Role using the Portal

    Create or update Azure custom roles using the Azure portal - Azure RBAC (16)

    If any errors are detected, a message will be displayed.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (17)

  3. View your new custom role in the Roles list. If you don't see your custom role, click Refresh.

    It can take a few minutes for your custom role to appear everywhere.

List custom roles

Follow these steps to view your custom roles.

  1. Open a subscription or resource group and then open Access control (IAM).

  2. Click the Roles tab to see a list of all the built-in and custom roles.

  3. In the Type list, select CustomRole to just see your custom roles.

    If you just created your custom role and you don't see it in the list, click Refresh.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (18)

Update a custom role

  1. As described earlier in this article, open your list of custom roles.

  2. Click the ellipsis (...) for the custom role you want to update and then click Edit. Note that you can't update built-in roles.

    The custom role is opened in the editor.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (19)

  3. Use the different tabs to update the custom role.

  4. Once you are finished with your changes, click the Review + create tab to review your changes.

  5. Click the Update button to update your custom role.

Delete a custom role

  1. Remove any role assignments that use the custom role. For more information, see Find role assignments to delete a custom role.

  2. As described earlier in this article, open your list of custom roles.

  3. Click the ellipsis (...) for the custom role you want to delete and then click Delete.

    Create or update Azure custom roles using the Azure portal - Azure RBAC (20)

    (Video) Azure RBAC - Built in roles and Custom Roles

    It can take a few minutes for your custom role to be completely deleted.

Next steps

  • Tutorial: Create an Azure custom role using Azure PowerShell
  • Azure custom roles
  • Azure resource provider operations

FAQs

Create or update Azure custom roles using the Azure portal - Azure RBAC? ›

In the Azure portal, open a management group, subscription, or resource group where you want the custom role to be assignable and then open Access control (IAM). Click Add and then click Add custom role.

How do I create a custom RBAC role in Azure portal? ›

Sign in to the Azure portal. Select Azure Active Directory > Roles and administrators > New custom role. On the Basics tab, provide a name and description for the role and then click Next. On the Permissions tab, select the permissions necessary to manage basic properties and credential properties of app registrations.

Does Azure RBAC support custom roles? ›

If the Azure built-in roles don't meet the specific needs of your organization, you can create your own custom roles. Just like built-in roles, you can assign custom roles to users, groups, and service principals at management group (in preview only), subscription, and resource group scopes.

Which tools are available to create custom RBAC role based access control in Microsoft Azure? ›

You can assign roles using the Azure portal, Azure CLI, Azure PowerShell, Azure SDKs, or REST APIs.

What is the difference between Azure AD roles and Azure RBAC? ›

While RBAC roles are used to manage access to Azure resources like VMs and storage accounts, Azure AD Administrator roles are used to manage Azure AD resources in a directory.

How do I create an Azure RBAC? ›

In Azure RBAC, to grant access, you assign an Azure role.
  1. In the list of Resource groups, open the new example-group resource group.
  2. In the navigation menu, click Access control (IAM).
  3. Click the Role assignments tab to see the current list of role assignments.
  4. Click Add > Add role assignment.
Aug 21, 2022

What is custom RBAC roles? ›

Custom role-based access control (RBAC) roles are a solution for organizations with use cases that are not addressed by default roles in DataRobot. System and organization administrators can create roles and define access at a more granular level, and assign them to users and groups.

How do I create a custom role? ›

Create a custom role
  1. Sign in to your Google Admin console. ...
  2. In the Admin console, go to Menu Account. ...
  3. Click Create new role.
  4. Enter a name and, optionally, a description for the role and click Continue.
  5. From the Privilege Name list, check boxes to select each privilege that you want users with this role to have.

What are the three types of role-based access RBAC controls in Microsoft Azure? ›

Azure broadly defines three different roles: Reader, Contributor, and Owner. These roles apply to Subscriptions, Resource Groups, and most all Resources on Azure.

What is an example of a RBAC? ›

An organization assigns a role-based access control role to every employee; the role determines which permissions the system grants to the user. For example, you can designate whether a user is an administrator, a specialist, or an end-user, and limit access to specific resources or tasks.

Which three of the following are built-in RBAC roles? ›

All
Built-in roleDescription
OwnerGrants full access to manage all resources, including the ability to assign roles in Azure RBAC.
ReaderView all resources, but does not allow you to make any changes.
User Access AdministratorLets you manage user access to Azure resources.
Compute
103 more rows
Mar 30, 2023

What are the 3 components necessary for any role-based access control RBAC assignment? ›

You control access to resources using RBAC by creating role assignments, which control how permissions are enforced. To create a role assignment, you need three elements: a security principal, a role definition, and a scope.

What are the RBAC roles for Azure functions? ›

User management permissions

Functions supports built-in Azure role-based access control (Azure RBAC). Azure roles supported by Functions are Contributor, Owner, and Reader. Permissions are effective at the function app level. The Contributor role is required to perform most function app-level tasks.

What are the 3 types of Azure roles? ›

Account Administrator, Service Administrator, and Co-Administrator are the three classic subscription administrator roles in Azure.

What is the difference between roles and permissions in RBAC? ›

RBAC creates roles for every organizational functionality, giving each role permission to access certain resources, and linking users to roles. Roles give RBAC flexibility that ACL lacks. Changes to a role's permissions automatically update permissions of each user with that role.

Which Azure AD RBAC roles are permitted to create an Azure Active Directory administrative unit? ›

As a Global Administrator or a Privileged Role Administrator, you can use the Azure portal to: Create administrative units.

How do I update custom roles in Azure? ›

In the Azure portal, open a management group, subscription, or resource group where you want the custom role to be assignable and then open Access control (IAM). Click Add and then click Add custom role. This opens the custom roles editor with the Start from scratch option selected.

What is the benefit of RBAC in Microsoft Azure? ›

Role-based access control Azure (RBAC) is a role-based authorization system on Azure Resource Manager that provides granular access management of Azure resources. With Azure RBAC, you can effectively segregate individual duties in your team and grant access that's enough to perform their jobs.

What is the difference between assigned roles and Azure role assignments? ›

Assigned roles are Azure AD administrator roles, for accessing Azure AD and other Microsoft 365 platforms such as Exchange and SharePoint. Azure role assignments (may also be referred to as Azure RBAC roles) are for accessing Azure resources such as virtual machines, storage accounts, subscriptions, etc.

Can a user have multiple roles in RBAC? ›

According to the figure, these relationships exist between parts of the RBAC model: Privileges can be assigned to multiple Roles. A User can have multiple Roles. A Group can have multiple Roles.

What are the two types of role-based access control? ›

Technical – assigned to users that perform technical tasks. Administrative – access for users that perform administrative tasks.

Who can Create and edit custom Roles? ›

By default, only the Workspace owner can create Custom Roles. Workspace owners can delegate managing Custom Roles to other admin-based roles.

What is Azure RBAC? ›

Azure role-based access control (Azure RBAC) is a system that provides fine-grained access management of Azure resources. Using Azure RBAC, you can segregate duties within your team and grant only the amount of access to users that they need to perform their jobs.

What is RBAC and how do you implement it? ›

Role-based access control (RBAC) allows users or groups to have specific permissions to access and manage resources. Typically, implementing RBAC to protect a resource includes protecting either a web application, a single-page application (SPA), or an API.

How is RBAC used to manage authorization? ›

How RBAC works. Predefined role assignments determine who can access specific Confluent Platform resources, and what actions an individual user can perform within that resource. An administrator assigns predefined roles to users and groups on various resources; each user can be assigned multiple roles on each resource.

What are the 4 fundamental Azure roles? ›

Azure roles
Azure rolePermissions
OwnerFull access to all resources Delegate access to others
ContributorCreate and manage all of types of Azure resources Create a new tenant in Azure Active Directory Can't grant access to others
ReaderView Azure resources
User Access AdministratorManage user access to Azure resources
Feb 19, 2023

What are the 4 types of Azure? ›

Most organizations will use more than one type of storage.
  1. Azure Blob Storage. Blob is one of the most common Azure storage types. ...
  2. Azure Files. Azure Files is Microsoft's managed file storage in the cloud. ...
  3. Azure Queue Storage. ...
  4. Azure Table. ...
  5. Azure Managed Disks.
Apr 19, 2022

How many types of roles are there in Azure? ›

Azure role-based access control (Azure RBAC) has over 120 built-in roles or you can create your own custom roles. This article describes how to list the built-in and custom roles that you can use to grant access to Azure resources.

How does RBAC work? ›

In RBAC, access permissions are assigned based on a defined role model. Defined user roles represent the work processes in an organization and vary from company to company. To effectively break down user roles, you could do this by department, location, cost center or employee responsibilities.

How to implement RBAC in Active Directory? ›

How to Implement RBAC in 8 Steps
  1. Audit your current status. The first thing you need to do is audit your current status. ...
  2. Define roles. ...
  3. Query-level implementation. ...
  4. Interface-level implementation. ...
  5. Component-level implementation. ...
  6. Testing roles and implementation. ...
  7. Role assignment. ...
  8. Monitoring and auditing.
May 23, 2022

Under which scope cannot an Azure RBAC role be assigned? ›

You're unable to assign a role at management group scope. Azure supports up to 500 role assignments per management group. This limit is different than the role assignments limit per subscription.

Where should RBAC be customized? ›

Steps to create Custom RBAC roles in Azure
  1. To create custom roles, you need to have “Owner” or “User Administrator” privileges.
  2. Go to your resource group and click on Access Control (IAM)
  3. In the right pane, click on +Add , Add custom role.

How do I create a custom role in ADF? ›

This scenario requires two role assignments.
  1. Assign the built-in contributor role at the data factory level.
  2. Create a custom role with the permission Microsoft. Resources/deployments/. Assign this custom role to the user at resource group level.
Feb 8, 2023

Which CLI command can we use to create a custom RBAC role from a JSON file? ›

To create a custom role, use az role definition create. The role definition can be a JSON description or a path to a file containing a JSON description.

How do I assign a custom role to a service principal? ›

To create a custom role and assign it to the service principal:
  1. On the home page of the Azure portal, click Subscriptions. ...
  2. On the left navigation bar, click Access Control (IAM). ...
  3. In the Create a custom role section, click Add. ...
  4. In Baseline permissions, select the Start from JSON option.

What are the three types of RBAC controls in Azure? ›

Azure broadly defines three different roles: Reader, Contributor, and Owner. These roles apply to Subscriptions, Resource Groups, and most all Resources on Azure.

How do I assign a custom role to an Azure application? ›

Assign the role to a user using the Azure portal
  1. Sign in to the Azure portal.
  2. Select Azure Active Directory > Roles and administrators.
  3. Select the Grant permissions to manage user and group assignments role.
  4. Select Add assignment, select the desired user, and then click Select to add role assignment to the user.
Mar 9, 2023

How do I create a custom role in Azure Devops? ›

To create a new role go to your subscription in the Azure portal, select the Access control (IAM) pane and then click Add under Create a custom role. In the Create a custom role window, provide a name and a description for your new role and then click on Permissions.

How do I create a custom field in Azure AD? ›

Create a custom attribute
  1. Sign in to the Azure portal as an Azure AD administrator.
  2. Under Azure services, select Azure Active Directory.
  3. In the left menu, select External Identities.
  4. Select Custom user attributes. ...
  5. To add an attribute, select Add.
  6. In the Add an attribute pane, enter the following values: ...
  7. Select Create.
Mar 15, 2023

Which Azure CLI command is used to assign RBAC roles? ›

To assign a role, use az role assignment create, specify a value for --assignee-object-id , and then set --assignee-principal-type to ServicePrincipal .

Who can create and edit custom roles? ›

By default, only the Workspace owner can create Custom Roles. Workspace owners can delegate managing Custom Roles to other admin-based roles.

What is the role of RBAC in Azure? ›

Azure role-based access control (Azure RBAC) is a system that provides fine-grained access management of Azure resources. Using Azure RBAC, you can segregate duties within your team and grant only the amount of access to users that they need to perform their jobs.

How do I assign permission to a role? ›

Go to Dashboard > User Management > Roles and click the name of the role to view. Click the Permissions tab, then click Add Permissions. Select the API from which you want to assign permissions, then select the permissions to add to the role, and click Add Permissions.

Which launch steps are available when creating a custom role? ›

When you create a custom role, you must choose an organization or project to create it in. You can then grant the custom role on the organization or project, as well as any resources within that organization or project. You can only grant a custom role within the project or organization in which you created it.

Videos

1. How to create a custom RBAC role using Azure portal
(Learning made easy)
2. Custom Roles in Azure
(John Savill's Technical Training)
3. How to create Role Based Access Control in Azure I Azure AD I RBAC using Azure Portal : Part 1
(Ajeet Kumar)
4. DEMO Azure Role Based Access Control - Azure RBAC DEMO step by step
(Paddy Maddy)
5. What are custom roles and how to create users|| Assign roles to users ||Azure Active Directory
(RaviTeja Mureboina)
6. How to create custom role in Azure | Assign custom role to Azure user | Azure Active Directory
(☁️ Cloud Nuggets ☁️)

References

Top Articles
Latest Posts
Article information

Author: Lilliana Bartoletti

Last Updated: 08/15/2023

Views: 6036

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Lilliana Bartoletti

Birthday: 1999-11-18

Address: 58866 Tricia Spurs, North Melvinberg, HI 91346-3774

Phone: +50616620367928

Job: Real-Estate Liaison

Hobby: Graffiti, Astronomy, Handball, Magic, Origami, Fashion, Foreign language learning

Introduction: My name is Lilliana Bartoletti, I am a adventurous, pleasant, shiny, beautiful, handsome, zealous, tasty person who loves writing and wants to share my knowledge and understanding with you.