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
This article helps you understand managed identity (formerly known as Managed Service Identity/MSI) and how it works in Azure Data Factory and Azure Synapse.
18
+
This article helps you understand managed identity (formerly known as Managed Service Identity/MSI) and how it works in Azure Data Factory.
@@ -25,8 +25,9 @@ Managed identities eliminate the need to manage credentials. Managed identities
25
25
26
26
There are two types of supported managed identities:
27
27
28
-
-**System-assigned:** You can enable a managed identity directly on a service instance. When you allow a system-assigned managed identity during the creation of the service, an identity is created in Azure AD tied to that service instance's lifecycle. By design, only that Azure resource can use this identity to request tokens from Azure AD. So when the resource is deleted, Azure automatically deletes the identity for you. Azure Synapse Analytics requires that a system-assigned managed identity must be created along with the Synapse workspace.
29
-
-**User-assigned:** You may also create a managed identity as a standalone Azure resource. You can [create a user-assigned managed identity](../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal.md) and assign it to one or more instances of a data factory or Synapse workspace. In user-assigned managed identities, the identity is managed separately from the resources that use it.
28
+
-**System-assigned:** You can enable a managed identity directly on a service instance. When you allow a system-assigned managed identity during the creation of the service, an identity is created in Azure AD tied to that service instance's lifecycle. By design, only that Azure resource can use this identity to request tokens from Azure AD. So when the resource is deleted, Azure automatically deletes the identity for you.
29
+
-
30
+
-**User-assigned:** You may also create a managed identity as a standalone Azure resource. You can [create a user-assigned managed identity](../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal.md) and assign it to one or more instances of a data factory. In user-assigned managed identities, the identity is managed separately from the resources that use it.
30
31
31
32
Managed identity provides the below benefits:
32
33
@@ -37,15 +38,15 @@ Managed identity provides the below benefits:
37
38
## System-assigned managed identity
38
39
39
40
>[!NOTE]
40
-
> System-assigned managed identity is also referred to as 'Managed identity' elsewhere in the documentation and in the Data Factory Studio and Synapse Studio UI for backward compatibility purpose. We will explicitly mention 'User-assigned managed identity' when referring to it.
41
+
> System-assigned managed identity is also referred to as 'Managed identity' elsewhere in the documentation and in the Data Factory Studio for backward compatibility purpose. We will explicitly mention 'User-assigned managed identity' when referring to it.
System-assigned managed identity is generated as follows:
45
46
46
-
- When creating a data factory or Synapse workspace through **Azure portal or PowerShell**, managed identity will always be created automatically.
47
-
- When creating data factory or workspace through **SDK**, managed identity will be created only if you specify "Identity = new FactoryIdentity()" in the factory object or Identity = new ManagedIdentity" in the Synapse workspace object for creation." See example in [.NET Quickstart - Create data factory](quickstart-create-data-factory-dot-net.md#create-a-data-factory).
48
-
- When creating data factory or Synapse workspace through **REST API**, managed identity will be created only if you specify "identity" section in request body. See example in [REST quickstart - create data factory](quickstart-create-data-factory-rest-api.md#create-a-data-factory).
47
+
- When creating a data factory through **Azure portal or PowerShell**, managed identity will always be created automatically.
48
+
- When creating data factory through **SDK**, managed identity will be created only if you specify "Identity = new FactoryIdentity()" in the factory object for creation." See example in [.NET Quickstart - Create data factory](quickstart-create-data-factory-dot-net.md#create-a-data-factory).
49
+
- When creating a data factory through **REST API**, managed identity will be created only if you specify "identity" section in request body. See example in [REST quickstart - create data factory](quickstart-create-data-factory-rest-api.md#create-a-data-factory).
49
50
50
51
If you find your service instance doesn't have a managed identity associated following [retrieve managed identity](#retrieve-managed-identity) instruction, you can explicitly generate one by updating it with identity initiator programmatically:
51
52
@@ -57,13 +58,11 @@ If you find your service instance doesn't have a managed identity associated fol
57
58
>[!NOTE]
58
59
>
59
60
>- Managed identity cannot be modified. Updating a service instance which already has a managed identity won't have any impact, and the managed identity is kept unchanged.
60
-
>- If you update a service instance which already has a managed identity without specifying the "identity" parameter in the factory or workspace objects or without specifying "identity" section in REST request body, you will get an error.
61
+
>- If you update a service instance which already has a managed identity without specifying the "identity" parameter in the factory objects or without specifying "identity" section in REST request body, you will get an error.
61
62
>- When you delete a service instance, the associated managed identity will be deleted along.
62
63
63
64
#### Generate system-assigned managed identity using PowerShell
64
65
65
-
# [Azure Data Factory](#tab/data-factory)
66
-
67
66
Call **Set-AzDataFactoryV2** command, then you see "Identity" fields being newly generated:
Id : /subscriptions/<subsID>/resourceGroups/<resourceGroupName>/providers/
104
-
Microsoft.Synapse/workspaces/<workspaceName>
105
-
Name : <workspaceName>
106
-
Type : Microsoft.Synapse/workspaces
107
-
```
108
-
---
109
79
110
80
#### Generate system-assigned managed identity using REST API
111
81
112
-
# [Azure Data Factory](#tab/data-factory)
113
-
114
82
> [!NOTE]
115
83
> If you attempt to update a service instance that already has a managed identity without either specifying the **identity** parameter in the factory object or providing an **identity** section in the REST request body, you will get an error.
> If you attempt to update a service instance that already has a managed identity without either specifying the **identity** parameter in the workspace object or providing an **identity** section in the REST request body, you will get an error.
162
-
163
-
Call the API below with the "identity" section in the request body:
@@ -286,21 +166,13 @@ You can retrieve the managed identity from Azure portal or programmatically. The
286
166
287
167
#### Retrieve system-assigned managed identity using Azure portal
288
168
289
-
# [Azure Data Factory](#tab/data-factory)
290
-
You can find the managed identity information from Azure portal -> your data factory or Synapse workspace -> Properties.
169
+
You can find the managed identity information from Azure portal -> your data factory -> Properties.
291
170
292
171
:::image type="content" source="media/data-factory-service-identity/system-managed-identity-in-portal.png" alt-text="Shows the Azure portal with the system-managed identity object ID and Identity Tenant for an Azure Data Factory." lightbox="media/data-factory-service-identity/system-managed-identity-in-portal.png":::
293
172
294
-
# [Synapse Analytics](#tab/synapse-analytics)
295
-
296
-
You can find the managed identity information from Azure portal -> your data factory or Synapse workspace -> Properties.
297
-
298
-
:::image type="content" source="media/data-factory-service-identity/system-managed-identity-in-portal-synapse.png" alt-text="Shows the Azure portal with the system-managed identity object ID for a Synapse workspace." lightbox="media/data-factory-service-identity/system-managed-identity-in-portal-synapse.png":::
299
-
300
-
---
301
173
302
174
- Managed Identity Object ID
303
-
- Managed Identity Tenant (only applicable for Azure Data Factory)
175
+
- Managed Identity Tenant
304
176
305
177
The managed identity information will also show up when you create linked service, which supports managed identity authentication, like Azure Blob, Azure Data Lake Storage, Azure Key Vault, etc.
306
178
@@ -322,7 +194,6 @@ To grant permissions, follow these steps. For detailed steps, see [Assign Azure
322
194
323
195
#### Retrieve system-assigned managed identity using PowerShell
324
196
325
-
# [Azure Data Factory](#tab/data-factory)
326
197
The managed identity principal ID and tenant ID will be returned when you get a specific service instance as follows. Use the **PrincipalId** to grant access:
The managed identity principal ID and tenant ID will be returned when you get a specific service instance as follows. Use the **PrincipalId** to grant access:
The managed identity principal ID and tenant ID will be returned when you get a specific service instance as follows.
375
222
376
223
Call below API in the request:
@@ -423,75 +270,6 @@ GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{
423
270
}
424
271
}
425
272
```
426
-
# [Azure Synapse](#tab/synapse-analytics)
427
-
The managed identity principal ID and tenant ID will be returned when you get a specific service instance as follows.
428
-
429
-
Call below API in the request:
430
-
431
-
```
432
-
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}?api-version=2018-06-01
433
-
```
434
-
435
-
**Response**: You will get response like shown in below example. The "identity" section is populated accordingly.
@@ -508,4 +286,4 @@ See the following topics that introduce when and how to use managed identity:
508
286
-[Store credential in Azure Key Vault](store-credentials-in-key-vault.md).
509
287
-[Copy data from/to Azure Data Lake Store using managed identities for Azure resources authentication](connector-azure-data-lake-store.md).
510
288
511
-
See [Managed Identities for Azure Resources Overview](../active-directory/managed-identities-azure-resources/overview.md) for more background on managed identities for Azure resources, on which managed identity in Azure Data Factory and Azure Synapse is based.
289
+
See [Managed Identities for Azure Resources Overview](../active-directory/managed-identities-azure-resources/overview.md) for more background on managed identities for Azure resources, on which managed identity in Azure Data Factory is based.
0 commit comments