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: Learn how to access to an Azure Load Testing resource using Azure role-based access control (Azure RBAC).
3
+
description: Learn how to manage access to an Azure load testing resource using Azure role-based access control (Azure RBAC).
4
4
author: ntrogh
5
5
ms.author: nicktrog
6
6
services: load-testing
7
7
ms.service: load-testing
8
8
ms.topic: how-to
9
-
ms.date: 03/15/2022
9
+
ms.date: 11/07/2022
10
10
ms.custom: template-how-to
11
11
---
12
12
13
13
# Manage access to Azure Load Testing
14
14
15
-
In this article, you learn how to manage access (authorization) to an Azure Load Testing resource. [Azure role-based access control (Azure RBAC)](../role-based-access-control/overview.md) is used to manage access to Azure resources, such as the ability to create new resources or use existing ones. Users in your Azure Active Directory (Azure AD) are assigned specific roles, which grant access to resources.
15
+
In this article, you learn how to manage access (authorization) to an Azure load testing resource. [Azure role-based access control (Azure RBAC)](../role-based-access-control/overview.md) is used to manage access to Azure resources, such as the ability to create new resources or use existing ones. You can grant role-based access to users using the Azure portal, Azure Command-Line tools, or Azure Management APIs.
16
16
17
17
> [!IMPORTANT]
18
18
> Azure Load Testing is currently in preview. For legal terms that apply to Azure features that are in beta, in preview, or otherwise not yet released into general availability, see the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
@@ -23,11 +23,11 @@ To assign Azure roles, you must have:
23
23
24
24
*`Microsoft.Authorization/roleAssignments/write` permissions, such as [User Access Administrator](../role-based-access-control/built-in-roles.md#user-access-administrator) or [Owner](../role-based-access-control/built-in-roles.md#owner).
25
25
26
-
## Default roles
26
+
## Roles in Azure Load Testing
27
27
28
-
Azure Load Testing resources have three built-in roles that are available by default. When you add users to a resource, you can assign one of the built-in roles to grant permissions:
28
+
In Azure Load Testing, access is granted by assigning the appropriate Azure role to users, groups, and applications at the load testing resource scope. Following are the built-in roles supported by a load testing resource:
29
29
30
-
| Role |Access level|
30
+
| Role |Description|
31
31
| --- | --- |
32
32
|**Load Test Reader**| Read-only actions in the Load Testing resource. Readers can list and view tests and test runs in the resource. Readers can't create, update, or run tests. |
33
33
|**Load Test Contributor**| View, create, edit, or delete (where applicable) tests and test runs in a Load Testing resource. |
@@ -42,28 +42,129 @@ You'll encounter this message if your account doesn't have the necessary permiss
42
42
> [!IMPORTANT]
43
43
> Role access can be scoped to multiple levels in Azure. For example, someone with owner access to a resource may not have owner access to the resource group that contains the resource. For more information, see [How Azure RBAC works](../role-based-access-control/overview.md#how-azure-rbac-works).
44
44
45
-
## Manage resource access
45
+
## Role permissions
46
46
47
-
You can manage access to the Azure Load Testing resource by using the Azure portal:
47
+
The following tables describe the specific permissions given to each role. This can include Actions, which give permissions, and Not Actions, which restrict them.
48
48
49
-
1. In the [Azure portal](https://portal.azure.com), go to your Azure Load Testing resource.
49
+
### Load Test Owner
50
50
51
-
1. On the left pane, select **Access Control (IAM)**, and then select **Add role assignment**.
51
+
A Load Test Owner can manage everything, including access. The following table shows the permissions granted for the role:
52
52
53
-
:::image type="content" source="media/how-to-assign-roles/load-test-access-control.png" alt-text="Screenshot that shows how to configure access control.":::
53
+
| Actions | Description |
54
+
| ------- | ----------- |
55
+
| Microsoft.Resources/deployments/*| Create and manage resource group deployments. |
56
+
| Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
57
+
| Microsoft.Insights/alertRules/*| Create and manage alert rules. |
| Microsoft.LoadTestService/*| Create and manage load testing resources. |
54
60
55
-
1. Assign one of the Azure Load Testing [built-in roles](#default-roles). For details about how to assign roles, see [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md).
61
+
| DataActions | Description |
62
+
| ------- | ----------- |
63
+
| Microsoft.LoadTestService/loadtests/*| Start, stop, and manage load tests. |
56
64
57
-
The role assignments might take a few minutes to become active for your account. Refresh the webpage for the user interface to reflect the updated permissions.
65
+
### Load Test Contributor
58
66
59
-
:::image type="content" source="media/how-to-assign-roles/add-role-assignment.png" alt-text="Screenshot that shows the role assignment screen.":::
67
+
A Load Test Contributor can manage everything except access. The following table shows the permissions granted for the role:
60
68
61
-
Alternatively, you can manage access without using the Azure portal:
69
+
| Actions | Description |
70
+
| ------- | ----------- |
71
+
| Microsoft.Resources/deployments/*| Create and manage resource group deployments. |
72
+
| Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
73
+
| Microsoft.Insights/alertRules/*| Create and manage alert rules. |
| Microsoft.LoadTestService/loadtests/*| Start, stop, and manage load tests. |
80
+
81
+
### Load Test Reader
82
+
83
+
A Load Test Reader can view all the resources in a load testing resource but can't make any changes. The following table shows the permissions granted for the role:
84
+
85
+
| Actions | Description |
86
+
| ------- | ----------- |
87
+
| Microsoft.Resources/deployments/*| Create and manage resource group deployments. |
88
+
| Microsoft.Resources/subscriptions/resourceGroups/read | Gets or lists resource groups. |
89
+
| Microsoft.Insights/alertRules/*| Create and manage alert rules. |
## Configure Azure RBAC for your load testing resource
98
+
99
+
The following section shows you how to configure Azure RBAC on your load testing resource through the Azure portal and PowerShell.
100
+
101
+
### Configure Azure RBAC using the Azure portal
102
+
103
+
1. Sign in to the [Azure portal](https://portal.azure.com/) and open your load testing resource from the **Azure Load Testing** page.
104
+
105
+
1. Select **Access control (IAM)** and select a role from the list of available roles. You can choose any of the available built-in roles that an Azure load testing resource supports or any custom role you might have defined. Assign the role to a user to which you want to give permissions.
106
+
107
+
For detailed steps, see [Assign Azure roles using the Azure portal](/azure/role-based-access-control/role-assignments-portal).
108
+
109
+
#### Remove role assignments from a user
110
+
111
+
You can remove the access permission for a user who isn't managing the Azure load testing resource, or who no longer works for the organization. The following steps show how to remove the role assignments from a user. For detailed steps, see [Remove Azure role assignments](/azure/role-based-access-control/role-assignments-remove):
112
+
113
+
1. Open **Access control (IAM)** at a scope, such as management group, subscription, resource group, or resource, where you want to remove access.
114
+
115
+
1. Select the **Role assignments** tab to view all the role assignments at this scope.
116
+
117
+
1. In the list of role assignments, add a checkmark next to the user with the role assignment you want to remove.
118
+
119
+
1. Select **Remove**, and then select **Yes** to confirm.
120
+
121
+
### Configure Azure RBAC using PowerShell
122
+
123
+
You can also configure role-based access to a load testing resource using the following [Azure PowerShell cmdlets](/azure/role-based-access-control/role-assignments-powershell):
124
+
125
+
*[Get-AzRoleDefinition](/powershell/module/Az.Resources/Get-AzRoleDefinition) lists all Azure roles that are available in Azure Active Directory. You can use this cmdlet with the Name parameter to list all the actions that a specific role can perform.
126
+
127
+
```azurepowershell-interactive
128
+
Get-AzRoleDefinition -Name 'Load Test Contributor'
129
+
```
130
+
131
+
The following is the example output:
132
+
133
+
```output
134
+
Name : Load Test Contributor
135
+
Id : 00000000-0000-0000-0000-000000000000
136
+
IsCustom : False
137
+
Description : View, create, update, delete and execute load tests. View and list load test resources but can not make any changes.
* [Get-AzRoleAssignment](/powershell/module/az.resources/get-azroleassignment) lists Azure role assignments at the specified scope. Without any parameters, this cmdlet returns all the role assignments made under the subscription. Use the `ExpandPrincipalGroups` parameter to list access assignments for the specified user, as well as the groups that the user belongs to.
146
+
147
+
**Example**: Use the following cmdlet to list all the users and their roles within a load testing resource.
148
+
149
+
```azurepowershell-interactive
150
+
Get-AzRoleAssignment -Scope '/subscriptions/<SubscriptionID>/resourcegroups/<Resource Group Name>/Providers/Microsoft.LoadTestService/loadtests/<Load Test Name>'
151
+
```
152
+
153
+
* Use [New-AzRoleAssignment](/powershell/module/Az.Resources/New-AzRoleAssignment) to assign access to users, groups, and applications to a particular scope.
154
+
155
+
**Example**: Use the following command to assign the "Load Test Reader" role for a user in the load testing resource scope.
156
+
157
+
```azurepowershell-interactive
158
+
New-AzRoleAssignment -SignInName <sign-in Id of a user you wish to grant access> -RoleDefinitionName 'Load Test Reader' -Scope '/subscriptions/<SubscriptionID>/resourcegroups/<Resource Group Name>/Providers/Microsoft.LoadTestService/loadtests/<Load Testing resource name>'
159
+
```
160
+
161
+
* Use [Remove-AzRoleAssignment](/powershell/module/Az.Resources/Remove-AzRoleAssignment) to remove access of a specified user, group, or application from a particular scope.
162
+
163
+
**Example**: Use the following command to remove the user from the Load Test Reader role in the load testing resource scope.
164
+
165
+
```azurepowershell-interactive
166
+
Remove-AzRoleAssignment -SignInName <sign-in Id of a user you wish to remove> -RoleDefinitionName 'Load Test Reader' -Scope '/subscriptions/<SubscriptionID>/resourcegroups/<Resource Group Name>/Providers/Microsoft.LoadTestService/loadtests/<Load Testing resource name>'
0 commit comments