You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Use the Azure portal or CLI to secure access to Azure IoT Operations resources such as dataflows and assets by using Azure role-based access control.
2
+
title: Custom RBAC for your resources
3
+
description: Use the Azure portal to secure access to Azure IoT Operations resources such as data flows and assets by using Azure role-based access control.
4
4
author: dominicbetts
5
5
ms.author: dobett
6
-
ms.topic: how-to
7
-
ms.date: 04/10/2025
6
+
ms.topic: reference
7
+
ms.date: 04/15/2025
8
8
9
-
#CustomerIntent: As an IT administrator, I want configure Azure RBAC on resources in my Azure IoT Operations instance to control access to them.
9
+
#CustomerIntent: As an IT administrator, I want configure Azure RBAC custom roles on resources in my Azure IoT Operations instance to control access to them.
10
10
---
11
11
12
-
# Configure RBAC
12
+
# Custom RBAC for your Azure IoT Operations resources
13
13
14
-
To manage access to Azure IoT Operations resources such as assets and data flows, you can use Azure role-based access control (RBAC). Azure RBAC is an authorization system that enables you to manage access to Azure resources. You can use Azure RBAC to grant permissions to users, groups, and applications at a scope such as a subscription or resource group.
14
+
To define custom roles that grant specific permissions to users, you can use Azure RBAC. For example, you can define an **Onboarding** role that grants sufficient permissions to a user to complete the Azure Arc connect process and deploy Azure IoT Operations securely.
15
15
16
-
This article describes how you can create custom roles for Azure IoT Operations and assign them to users. You can use some or all of the example [custom roles](#list-of-custom-roles) in your environment
16
+
This article includes a list of example that you can download and use in your environment. These custom roles are JSON files that list the specific permissions and scope for the role.
17
17
18
-
For example, you can assign a user the **Data Flow Administrator**custom role in a specific resource group. This role allows the user to create and manage data flows in the resource group. For another user, you can assign the **Data Flow Viewer**custom role in the same resource group. This role allows the user to view data flows but not create or manage them.
18
+
To learn more about custom roles in Azure RBAC, see [Azure custom roles](/azure/role-based-access-control/custom-roles).
19
19
20
-
You can assign custom roles at either the subscription or resource group level. Assigning roles at the level of a resource group enables the most granular control.
20
+
## Example custom roles
21
21
22
-
> [!NOTE]
23
-
> The Assets Endpoint Administrator and Data Flow Endpoint Administrator roles have access to Azure Key Vault. However, even if these custom roles are assigned at the subscription level, users can only see the list of key vaults from the specific resource group. Access to schema registries is also restricted to the resource group level.
22
+
The following sections list the example Azure IoT Operations custom roles you can download and use:
24
23
25
-
To learn more about Azure RBAC, see [What is Azure role-based access control (Azure RBAC)?](/azure/role-based-access-control/overview).
24
+
### Onboarding roles
25
+
26
+
| Custom role | Description |
27
+
| ----------- | ----------- |
28
+
|[Onboarding](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Onboarding.json)| This is privileged role. The user can complete Azure Arc connect process and deploy Azure IoT Operations securely. |
26
29
27
-
## Create custom role definitions
30
+
### Viewer roles
31
+
32
+
| Custom role | Description |
33
+
| ----------- | ----------- |
34
+
|[Instance viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Instance%20Viewer.json)| This role allows the user to view the Azure IoT Operations instance. |
35
+
|[Asset viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Viewer.json)| This role allows the user to view the assets in the Azure IoT Operations instance. |
36
+
|[Asset endpoint viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Endpoint%20Viewer.json)| This role allows the user to view the asset endpoints in the Azure IoT Operations instance. |
37
+
|[Data flow viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Viewer.json)| This role allows the user to view the data flows in the Azure IoT Operations instance. |
38
+
|[Data flow destination viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Destination%20Viewer.json)| This role allows the user to view the data flow destinations in the Azure IoT Operations instance. |
39
+
|[MQ viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/MQ%20Viewer.json)| This role allows the user to view the MQTT broker in the Azure IoT Operations instance. |
40
+
|[Viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Viewer.json)| This role allows the user to view the Azure IoT Operations instance. This role is a combination of the **Instance viewer**, **Asset viewer**, **Asset endpoint viewer**, **Data flow viewer**, **Data flow destination viewer**, and **MQ viewer** roles. |
41
+
42
+
### Administrator roles
43
+
44
+
| Custom role | Description |
45
+
| ----------- | ----------- |
46
+
|[Instance administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Instance%20Administrator.json)| The user can deploy an instance. The role includes permissions to create and update instances, brokers, authentications, listeners, dataflow profiles, dataflow endpoints, schema registries, and user assigned identities. The role also incudes permission to delete instances. |
47
+
|[Asset administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Administrator.json)| The user can create and manage assets in the Azure IoT Operations instance. |
48
+
|[Asset endpoint administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Endpoint%20Administrator.json)| The user can create and manage asset endpoints in the Azure IoT Operations instance. |
49
+
|[Data flow administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Administrator.json)| The user can create and manage data flows in the Azure IoT Operations instance. |
50
+
|[Data flow destination administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Destination%20Administrator.json)| The user can create and manage data flow destinations in the Azure IoT Operations instance. |
51
+
|[MQ administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/MQ%20Administrator.json)| The user can create and manage the MQTT broker in the Azure IoT Operations instance. |
52
+
|[Administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Administrator.json)| The user can create and manage the Azure IoT Operations instance. This role is a combination of the **Instance administrator**, **Asset administrator**, **Asset endpoint administrator**, **Data flow administrator**, **Data flow destination administrator**, and **MQ administrator** roles. |
53
+
54
+
> [!NOTE]
55
+
> The example _Assets endpoint administrator_ and _Data flow destination administrator_ roles have access to Azure Key Vault. However, even if these custom roles are assigned at the subscription level, users can only see the list of key vaults from the specific resource group. Access to schema registries is also restricted to the resource group level.
56
+
57
+
## Create a custom role definition
28
58
29
59
To prepare one of the sample custom roles:
30
60
31
-
1. Download the [JSON file for the custom role](#create-custom-role-definitions) you want to create. The JSON file contains the role definition, including the permissions and scope for the role.
61
+
1. Download the JSON file for the custom role you want to create. The JSON file contains the role definition, including the permissions and scope for the role.
32
62
33
63
1. Edit the JSON file to replace the placeholder value in the `assignableScopes` field with your subscription ID. Save your changes.
34
64
@@ -40,27 +70,17 @@ To add the custom role to your Azure subscription using the Azure portal:
40
70
41
71
1. Select **Add > Add custom role**.
42
72
43
-
1. Enter a name, such as **Data flow administrator**, and a description for the role.
73
+
1. Enter a name, such as **Onboarding**, and a description for the role.
44
74
45
75
1. Select **Start from JSON** and then select the JSON file you downloaded. The custom role name and description are populated from the file.
46
76
47
77
1. Optionally, review the permissions and assignable scopes.
48
78
49
79
1. To add the custom role to your subscription, select **Review + create** and then **Create**.
50
80
51
-
To add the custom role to your Azure subscription using the Azure CLI:
52
-
53
-
1. Open a command prompt and log in to your Azure account using the `az login` command.
54
-
55
-
1. The following command shows how to create the **Data flow administrator** custom role:
56
-
57
-
```console
58
-
az role definition create --role-definition "Data Flow Administrator.json"
59
-
```
60
-
61
-
## Assign roles
81
+
## Configure and use a custom role
62
82
63
-
After you create the custom roles in your subscription, you can assign them to users, groups, or applications. You can assign roles at the subscription or resource group level.
83
+
After you create the custom roles in your subscription, you can assign them to users, groups, or applications. You can assign roles at the subscription or resource group level. Assigning roles at the level of a resource group enables the most granular control.
64
84
65
85
To assign the custom role to a user at the resource group level using the Azure portal:
66
86
@@ -75,49 +95,3 @@ To assign the custom role to a user at the resource group level using the Azure
75
95
1. Select the user or users you want to assign the role to. You can search for users by name or email address.
76
96
77
97
1. Select **Review + assign** to review the role assignment. If everything looks good, select **Assign**.
78
-
79
-
To create a role assignment at the resource group level using the Azure CLI:
80
-
81
-
1. Open a command prompt and log in to your Azure account using the `az login` command.
82
-
83
-
1. The following command shows how to assign a user to the **Data flow administrator** custom role:
84
-
85
-
```console
86
-
az role assignment create --assignee "<User to assign>" \
87
-
--role "Data flow administrator" \
88
-
--scope "/subscriptions/<Your subscription Id>/resourceGroups/<Your resource group name>"
89
-
```
90
-
91
-
## List of custom roles
92
-
93
-
The following sections list the example Azure IoT Operations custom roles you can download and use:
94
-
95
-
### Onboarding roles
96
-
97
-
| Custom role | Description |
98
-
| ----------- | ----------- |
99
-
| [Onboarding](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Onboarding.json) | This is privileged role. The user can complete Azure Arc connect process and deploy Azure IoT Operations securely. |
100
-
101
-
### Viewer roles
102
-
103
-
| Custom role | Description |
104
-
| ----------- | ----------- |
105
-
| [Instance viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Instance%20Viewer.json) | This role allows the user to view the Azure IoT Operations instance. |
106
-
| [Asset viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Viewer.json) | This role allows the user to view the assets in the Azure IoT Operations instance. |
107
-
| [Asset endpoint viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Endpoint%20Viewer.json) | This role allows the user to view the asset endpoints in the Azure IoT Operations instance. |
108
-
| [Data flow viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Viewer.json) | This role allows the user to view the data flows in the Azure IoT Operations instance. |
109
-
| [Data flow destination viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Destination%20Viewer.json) | This role allows the user to view the data flow destinations in the Azure IoT Operations instance. |
110
-
| [MQ viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/MQ%20Viewer.json) | This role allows the user to view the MQTT broker in the Azure IoT Operations instance. |
111
-
| [Viewer](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Viewer.json) | This role allows the user to view the Azure IoT Operations instance. This role is a combination of the **Instance viewer**, **Asset viewer**, **Asset endpoint viewer**, **Data flow viewer**, **Data flow destination viewer**, and **MQ viewer** roles. |
112
-
113
-
### Administrator roles
114
-
115
-
| Custom role | Description |
116
-
| ----------- | ----------- |
117
-
| [Instance administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Instance%20Administrator.json) | The user can deploy an instance. The role includes permissions to create and update instances, brokers, authentications, listeners, dataflow profiles, dataflow endpoints, schema registries, and user assigned identities. The role also incudes permission to delete instances. |
118
-
| [Asset administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Administrator.json) | The user can create and manage assets in the Azure IoT Operations instance. |
119
-
| [Asset endpoint administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Asset%20Endpoint%20Administrator.json) | The user can create and manage asset endpoints in the Azure IoT Operations instance. |
120
-
| [Data flow administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Administrator.json) | The user can create and manage data flows in the Azure IoT Operations instance. |
121
-
| [Data flow destination administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Data%20Flow%20Destination%20Administrator.json) | The user can create and manage data flow destinations in the Azure IoT Operations instance. |
122
-
| [MQ administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/MQ%20Administrator.json) | The user can create and manage the MQTT broker in the Azure IoT Operations instance. |
123
-
| [Administrator](https://github.com/Azure-Samples/explore-iot-operations/blob/main/samples/custom-rbac/Administrator.json) | The user can create and manage the Azure IoT Operations instance. This role is a combination of the **Instance administrator**, **Asset administrator**, **Asset endpoint administrator**, **Data flow administrator**, **Data flow destination administrator**, and **MQ administrator** roles. |
0 commit comments