Skip to content

Commit 1d0dbf6

Browse files
authored
Update batch-aad-auth.md
1 parent 9ab8f73 commit 1d0dbf6

File tree

1 file changed

+3
-67
lines changed

1 file changed

+3
-67
lines changed

articles/batch/batch-aad-auth.md

Lines changed: 3 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Authenticate Azure Batch services with Microsoft Entra ID
33
description: Learn how to authenticate Azure Batch service applications with Microsoft Entra ID by using integrated authentication or a service principal.
44
ms.topic: how-to
5-
ms.date: 06/27/2024
5+
ms.date: 12/11/2024
66
ms.custom: has-adal-ref, subject-rbac-steps
77
---
88

@@ -95,82 +95,18 @@ Follow these steps to create and copy the secret key to use in your code:
9595

9696
### Assign Azure RBAC to your application
9797

98-
Follow these steps to assign an Azure RBAC role to your application. For detailed steps, see [Assign Azure roles by using the Azure portal](/azure/role-based-access-control/role-assignments-portal).
98+
Follow these steps to assign an Azure RBAC role to your application. For more information, see [Role-based access control for Azure Batch service](./batch-role-based-access-control.md).
9999

100100
1. In the Azure portal, navigate to the Batch account your application uses.
101101
1. Select **Access control (IAM)** from the left navigation.
102102
1. On the **Access control (IAM)** page, select **Add role assignment**.
103-
1. On the **Add role assignment** page, select the **Role** tab, and then select either the [Contributor](/azure/role-based-access-control/built-in-roles#contributor) or [Reader](/azure/role-based-access-control/built-in-roles#reader) role for your app.
103+
1. On the **Add role assignment** page, select the **Role** tab, and then select one of [Azure Batch built-in RBAC roles](./batch-role-based-access-control.md#azure-batch-built-in-rbac-roles) the role for your app.
104104
1. Select the **Members** tab, and select **Select members** under **Members**.
105105
1. On the **Select members** screen, search for and select your application, and then select **Select**.
106106
1. Select **Review + assign** on the **Add role assignment** page.
107107

108108
Your application should now appear on the **Role assignments** tab of the Batch account's **Access control (IAM)** page.
109109

110-
### Assign a custom role
111-
112-
A custom role grants granular permission to a user for submitting jobs, tasks, and more. You can use custom roles to prevent users from performing operations that affect cost, such as creating pools or modifying nodes.
113-
114-
You can use a custom role to grant or deny permissions to a Microsoft Entra user, group, or service principal for the following Azure Batch RBAC operations:
115-
116-
- Microsoft.Batch/batchAccounts/pools/write
117-
- Microsoft.Batch/batchAccounts/pools/delete
118-
- Microsoft.Batch/batchAccounts/pools/read
119-
- Microsoft.Batch/batchAccounts/jobSchedules/write
120-
- Microsoft.Batch/batchAccounts/jobSchedules/delete
121-
- Microsoft.Batch/batchAccounts/jobSchedules/read
122-
- Microsoft.Batch/batchAccounts/jobs/write
123-
- Microsoft.Batch/batchAccounts/jobs/delete
124-
- Microsoft.Batch/batchAccounts/jobs/read
125-
- Microsoft.Batch/batchAccounts/certificates/write
126-
- Microsoft.Batch/batchAccounts/certificates/delete
127-
- Microsoft.Batch/batchAccounts/certificates/read
128-
- Microsoft.Batch/batchAccounts/read, for any read operation
129-
- Microsoft.Batch/batchAccounts/listKeys/action, for any operation
130-
131-
Custom roles are for users authenticated by Microsoft Entra ID, not for the Batch shared key account credentials. The Batch account credentials give full permission to the Batch account. Jobs that use [autopool](nodes-and-pools.md#autopools) require pool-level permissions.
132-
133-
> [!NOTE]
134-
> Certain role assignments need to be specified in the `actions` field, whereas others need to be specified in the `dataActions` field. For more information, see [Azure resource provider operations](/azure/role-based-access-control/resource-provider-operations#microsoftbatch).
135-
136-
The following example shows an Azure Batch custom role definition:
137-
138-
```json
139-
{
140-
"properties":{
141-
"roleName":"Azure Batch Custom Job Submitter",
142-
"type":"CustomRole",
143-
"description":"Allows a user to submit jobs to Azure Batch but not manage pools",
144-
"assignableScopes":[
145-
"/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
146-
],
147-
"permissions":[
148-
{
149-
"actions":[
150-
"Microsoft.Batch/*/read",
151-
"Microsoft.Authorization/*/read",
152-
"Microsoft.Resources/subscriptions/resourceGroups/read",
153-
"Microsoft.Support/*",
154-
"Microsoft.Insights/alertRules/*"
155-
],
156-
"notActions":[
157-
158-
],
159-
"dataActions":[
160-
"Microsoft.Batch/batchAccounts/jobs/*",
161-
"Microsoft.Batch/batchAccounts/jobSchedules/*"
162-
],
163-
"notDataActions":[
164-
165-
]
166-
}
167-
]
168-
}
169-
}
170-
```
171-
172-
For more information on creating a custom role, see [Azure custom roles](../role-based-access-control/custom-roles.md).
173-
174110
## Code examples
175111

176112
The code examples in this section show how to authenticate with Microsoft Entra ID by using integrated authentication or with a service principal. The code examples use .NET and Python, but the concepts are similar for other languages.

0 commit comments

Comments
 (0)