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
Copy file name to clipboardExpand all lines: articles/machine-learning/batch-inference/how-to-authenticate-batch-endpoint.md
+30-14Lines changed: 30 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,13 +41,13 @@ You can either use one of the [built-in security roles](../../role-based-access-
41
41
42
42
The following examples show different ways to start batch deployment jobs using different types of credentials:
43
43
44
+
> [!IMPORTANT]
45
+
> When working on a private link-enabled workspaces, batch endpoints can't be invoked from the UI in Azure ML studio. Please use the Azure ML CLI v2 instead for job creation.
46
+
44
47
### Running jobs using user's credentials
45
48
46
49
In this case, we want to execute a batch endpoint using the identity of the user currenly logged in. Follow these steps:
47
50
48
-
> [!IMPORTANT]
49
-
> When working on a private link-enabled workspaces, batch endpoints can't be invoked from the UI in Azure ML studio. Please use the Azure ML CLI v2 instead for job creation.
50
-
51
51
> [!NOTE]
52
52
> When working on Azure ML studio, batch endpoints/deployments are always executed using the identity of the current user logged in.
53
53
@@ -89,6 +89,10 @@ In this case, we want to execute a batch endpoint using the identity of the user
89
89
)
90
90
```
91
91
92
+
# [REST](#tab/rest)
93
+
94
+
When working with REST APIs, we recommend to use either a service principal or a managed identity to interact with the API.
95
+
92
96
---
93
97
94
98
### Running jobs using a service principal
@@ -97,7 +101,7 @@ In this case, we want to execute a batch endpoint using a service princpal alrea
97
101
98
102
# [Azure ML CLI](#tab/cli)
99
103
100
-
1. Create a secret to use for authentication as explained at [Option 2: Create a new application secret](../../active-directory/develop/howto-create-service-principal-portal#option-2-create-a-new-application-secret).
104
+
1. Create a secret to use for authentication as explained at [Option 2: Create a new application secret](../../active-directory/develop/howto-create-service-principal-portal.md#option-2-create-a-new-application-secret).
101
105
1. For more details see [Sign in with Azure CLI](/cli/azure/authenticate-azure-cli).
102
106
103
107
```bash
@@ -112,7 +116,7 @@ In this case, we want to execute a batch endpoint using a service princpal alrea
112
116
113
117
# [Azure ML SDK for Python](#tab/sdk)
114
118
115
-
1. Create a secret to use for authentication as explained at [Option 2: Create a new application secret](../../active-directory/develop/howto-create-service-principal-portal#option-2-create-a-new-application-secret).
119
+
1. Create a secret to use for authentication as explained at [Option 2: Create a new application secret](../../active-directory/develop/howto-create-service-principal-portal.md#option-2-create-a-new-application-secret).
116
120
1. To authenticate using a service principal, indicate the tenant ID, client ID and client secret of the service principal using environment variables as demonstrated:
117
121
118
122
```python
@@ -145,8 +149,11 @@ You can use the REST API of Azure Machine Learning to start a batch endpoints jo
145
149
146
150
1. Use the login service from Azure to get an authorization token. Authorization tokens are issued to a particular scope. The resource type for Azure Machine learning is `https://ml.azure.com`. The request would look as follows:
You can use the REST API of Azure Machine Learning to start a batch endpoints job using a managed identity. The steps vary depending on the underlying service being used. Some examples include (but are not limitted to):
230
+
231
+
*[Managed identity for Azure Data Factory](../../data-factory/data-factory-service-identity.md)
232
+
*[How to use managed identities for App Service and Azure Functions](../../app-service/overview-managed-identity.md).
233
+
*[How to use managed identities for Azure resources on an Azure VM to acquire an access token](../../active-directory/managed-identities-azure-resources/how-to-use-vm-token.md).
0 commit comments