Skip to content

Commit eb4055a

Browse files
authored
Merge pull request #282690 from v-luckywang/0731-Azure_File_mi_auth
[Doc update] MSI Auth for Azure Files
2 parents 1408cd8 + ba63edb commit eb4055a

File tree

1 file changed

+97
-1
lines changed

1 file changed

+97
-1
lines changed

articles/data-factory/connector-azure-file-storage.md

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: jianleishen
77
ms.subservice: data-movement
88
ms.topic: conceptual
99
ms.custom: synapse
10-
ms.date: 01/05/2024
10+
ms.date: 07/31/2024
1111
---
1212

1313
# Copy data from or to Azure Files by using Azure Data Factory
@@ -72,6 +72,8 @@ The Azure Files connector supports the following authentication types. See the c
7272

7373
- [Account key authentication](#account-key-authentication)
7474
- [Shared access signature authentication](#shared-access-signature-authentication)
75+
- [System-assigned managed identity authentication](#system-assigned-managed-identity-authentication)
76+
- [User-assigned managed identity authentication](#user-assigned-managed-identity-authentication)
7577

7678
>[!NOTE]
7779
> If you were using Azure Files linked service with [legacy model](#legacy-model), where on ADF authoring UI shown as "Basic authentication", it is still supported as-is, while you are suggested to use the new model going forward. The legacy model transfers data from/to storage over Server Message Block (SMB), while the new model utilizes the storage SDK which has better throughput. To upgrade, you can edit your linked service to switch the authentication method to "Account key" or "SAS URI"; no change needed on dataset or copy activity.
@@ -201,6 +203,100 @@ The service supports the following properties for using shared access signature
201203
}
202204
```
203205

206+
### System-assigned managed identity authentication
207+
208+
A data factory or Synapse pipeline can be associated with a [system-assigned managed identity for Azure resources](data-factory-service-identity.md#system-assigned-managed-identity), which represents that resource for authentication to other Azure services. You can use this system-assigned managed identity for Azure Files authentication. To learn more about managed identities for Azure resources, see [Managed identities for Azure resources](../active-directory/managed-identities-azure-resources/overview.md).
209+
210+
To use system-assigned managed identity authentication, follow these steps:
211+
212+
1. [Retrieve system-assigned managed identity information](data-factory-service-identity.md#retrieve-managed-identity) by copying the value of the system-assigned managed identity object ID generated along with your factory or Synapse workspace.
213+
214+
2. Grant the managed identity permission in Azure Files. For more information on the roles, see this [article](../role-based-access-control/built-in-roles/storage.md#storage-file-data-smb-share-reader).
215+
216+
- **As source**, in **Access control (IAM)**, grant at least the **Storage File Data SMB Share Reader** role.
217+
- **As sink**, in **Access control (IAM)**, grant at least the **Storage File Data SMB Share Contributor** role.
218+
219+
These properties are supported for an Azure Files linked service:
220+
221+
| Property | Description | Required |
222+
|:--- |:--- |:--- |
223+
| type | The **type** property must be set to **AzureFileStorage**. | Yes |
224+
| serviceEndpoint | Specify the Azure Files service endpoint with the pattern of `https://<accountName>.file.core.windows.net/`. | Yes |
225+
| fileShare | Specify the file share. | Yes |
226+
| snapshot | Specify the date of the [file share snapshot](../storage/files/storage-snapshots-files.md) if you want to copy from a snapshot. | No |
227+
| connectVia | The [Integration Runtime](concepts-integration-runtime.md) to be used to connect to the data store. You can use Azure Integration Runtime. If not specified, it uses the default Azure Integration Runtime. |No |
228+
229+
>[!NOTE]
230+
>System-assigned managed identity authentication is only supported by Azure integration runtime.
231+
232+
**Example:**
233+
234+
```json
235+
{
236+
"name": "AzureFileStorageLinkedService",
237+
"properties": {
238+
"type": "AzureFileStorage",
239+
"typeProperties": {
240+
"serviceEndpoint": "https://<accountName>.file.core.windows.net/",
241+
"fileShare": "<file share name>",
242+
"snapshot": "<snapshot version>"
243+
},
244+
"connectVia": {
245+
"referenceName": "<name of Integration Runtime>",
246+
"type": "IntegrationRuntimeReference"
247+
}
248+
}
249+
}
250+
```
251+
252+
### User-assigned managed identity authentication
253+
254+
A data factory can be assigned with one or multiple [user-assigned managed identities](data-factory-service-identity.md#user-assigned-managed-identity). You can use this user-assigned managed identity for Azure Files authentication, which allows to access and copy data from or to Azure Files. To learn more about managed identities for Azure resources, see [Managed identities for Azure resources](../active-directory/managed-identities-azure-resources/overview.md).
255+
256+
To use user-assigned managed identity authentication, follow these steps:
257+
258+
1. [Create one or multiple user-assigned managed identities](../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal.md) and grant permission in Azure Files. For more information on the roles, see this [article](../role-based-access-control/built-in-roles/storage.md#storage-file-data-smb-share-reader).
259+
260+
- **As source**, in **Access control (IAM)**, grant at least the **Storage File Data SMB Share Reader** role.
261+
- **As sink**, in **Access control (IAM)**, grant at least the **Storage File Data SMB Share Contributor** role.
262+
263+
2. Assign one or multiple user-assigned managed identities to your data factory and [create credentials](credentials.md) for each user-assigned managed identity.
264+
265+
These properties are supported for an Azure Files linked service:
266+
267+
| Property | Description | Required |
268+
|:--- |:--- |:--- |
269+
| type | The **type** property must be set to **AzureFileStorage**. | Yes |
270+
| serviceEndpoint | Specify the Azure Files service endpoint with the pattern of `https://<accountName>.file.core.windows.net/`. | Yes |
271+
| credentials | Specify the user-assigned managed identity as the credential object. | Yes |
272+
| fileShare | Specify the file share. | Yes |
273+
| snapshot | Specify the date of the [file share snapshot](../storage/files/storage-snapshots-files.md) if you want to copy from a snapshot. | No |
274+
| connectVia | The [Integration Runtime](concepts-integration-runtime.md) to be used to connect to the data store. You can use Azure Integration Runtime or Self-hosted Integration Runtime (if your data store is located in private network). If not specified, it uses the default Azure Integration Runtime. |No |
275+
276+
**Example:**
277+
278+
```json
279+
{
280+
"name": "AzureFileStorageLinkedService",
281+
"properties": {
282+
"type": "AzureFileStorage",
283+
"typeProperties": {
284+
"serviceEndpoint": "https://<accountName>.file.core.windows.net/",
285+
"credential": {
286+
"referenceName": "credential1",
287+
"type": "CredentialReference"
288+
},
289+
"fileShare": "<file share name>",
290+
"snapshot": "<snapshot version>"
291+
},
292+
"connectVia": {
293+
"referenceName": "<name of Integration Runtime>",
294+
"type": "IntegrationRuntimeReference"
295+
}
296+
}
297+
}
298+
```
299+
204300
### Legacy model
205301

206302
| Property | Description | Required |

0 commit comments

Comments
 (0)