Skip to content

Commit d67046b

Browse files
authored
Update how-to-authenticate-batch-endpoint.md
1 parent e9ce167 commit d67046b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

articles/machine-learning/batch-inference/how-to-authenticate-batch-endpoint.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ ms.custom: devplatv2
1515

1616
# Authentication on batch endpoints
1717

18-
Batch endpoints support Azure Active Directory authentication, or `aad_token`. That means that in order to invoke a batch endpoint, the user must present a valid Azure Active Directory authentication token to the batch endpoint URI. Authorization is enforced at the endpoint level. The following article explains how to correctly interact with batch endpoints and the security requirements for it.
18+
Batch endpoints support Azure Active Directory authentication, or `aad_token`. That means that in order to invoke a batch endpoint, the user must present a valid Azure Active Directory authentication token to the batch endpoint URI. Authorization is enforced at the endpoint level. The following article explains how to correctly interact with batch endpoints and the security requirements for it.
1919

2020
## Prerequisites
2121

2222
* This example assumes that you have a model correctly deployed as a batch endpoint. Particularly, we are using the *heart condition classifier* created in the tutorial [Using MLflow models in batch deployments](how-to-mlflow-batch.md).
2323

2424
## How authentication works
2525

26-
To invoke a batch endpoint, the user must present a valid Azure Active Directory token representing a security principal. This principal can be a __user principal__ or a __service principal__. In any case, once an endpoint is invoked, a batch deployment job is created under the identity associated with the token. The identity needs the following permissions in order to successfully create a job:
26+
To invoke a batch endpoint, the user must present a valid Azure Active Directory token representing a __security principal__. This principal can be a __user principal__ or a __service principal__. In any case, once an endpoint is invoked, a batch deployment job is created under the identity associated with the token. The identity needs the following permissions in order to successfully create a job:
2727

2828
> [!div class="checklist"]
2929
> * Read batch endpoints/deployments.
@@ -91,7 +91,7 @@ In this case, we want to execute a batch endpoint using the identity of the user
9191
9292
# [REST](#tab/rest)
9393
94-
When working with REST APIs, we recommend to using either a service principal or a managed identity to interact with the API.
94+
When working with REST APIs, we recommend to using either a [service principal](#running-jobs-using-a-service-principal) or a [managed identity](#running-jobs-using-a-managed-identity) to interact with the API.
9595
9696
---
9797
@@ -151,9 +151,14 @@ You can use the REST API of Azure Machine Learning to start a batch endpoints jo
151151
152152
__Request__:
153153
154-
```Body
154+
```http
155155
POST /{TENANT_ID}/oauth2/token
156156
Host:https://login.microsoftonline.com
157+
```
158+
159+
__Body__:
160+
161+
```
157162
grant_type=client_credentials&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&resource=https://ml.azure.com
158163
```
159164
@@ -189,6 +194,8 @@ You can use the REST API of Azure Machine Learning to start a batch endpoints jo
189194
190195
### Running jobs using a managed identity
191196
197+
You can use managed identities to invoke batch endpoint and deployments. Please notice that this manage identity doesn't belong to the batch endpoint, but it is the identity used to execute the endpoint and hence create a batch job. Both user assigned and system assigned identities can be use in this scenario.
198+
192199
# [Azure ML CLI](#tab/cli)
193200
194201
On resources configured for managed identities for Azure resources, you can sign in using the managed identity. Signing in with the resource's identity is done through the `--identity` flag.

0 commit comments

Comments
 (0)