Skip to content

Commit 7c0b2eb

Browse files
committed
Add MI auth for Azure File
1 parent 7aa3a49 commit 7c0b2eb

File tree

1 file changed

+80
-1
lines changed

1 file changed

+80
-1
lines changed

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

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: data-factory
88
ms.subservice: data-movement
99
ms.topic: conceptual
1010
ms.custom: synapse
11-
ms.date: 01/05/2024
11+
ms.date: 07/31/2024
1212
---
1313

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

7474
- [Account key authentication](#account-key-authentication)
7575
- [Shared access signature authentication](#shared-access-signature-authentication)
76+
- [System-assigned managed identity authentication](#managed-identity)
77+
- [User-assigned managed identity authentication](#user-assigned-managed-identity-authentication)
7678

7779
>[!NOTE]
7880
> 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.
@@ -202,6 +204,83 @@ The service supports the following properties for using shared access signature
202204
}
203205
```
204206

207+
### System-assigned managed identity authentication
208+
209+
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)
210+
211+
To use system-assigned managed identity authentication, follow these steps:
212+
213+
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.
214+
215+
2. Grant the managed identity permission in Azure Files. For more information on the roles, see [Use the Azure portal to assign an Azure role for access to blob and queue data](../role-based-access-control/built-in-roles/storage.md#storage-file-data-smb-share-reader).
216+
217+
- **As source**, in **Access control (IAM)**, grant at least the **Storage File Data SMB Share Reader** role.
218+
- **As sink**, in **Access control (IAM)**, grant at least the **Storage File Data SMB Share Contributor** role.
219+
220+
These properties are supported for an Azure Files linked service:
221+
222+
| Property | Description | Required |
223+
|:--- |:--- |:--- |
224+
| type | The **type** property must be set to **AzureFileStorage**. | Yes |
225+
| serviceEndpoint | Specify the Azure Files service endpoint with the pattern of `https://<accountName>.file.core.windows.net/`. | Yes |
226+
| fileShare | Specify the file share. | Yes |
227+
228+
**Example:**
229+
230+
```json
231+
{
232+
"name": "AzureFileStorageLinkedService",
233+
"properties": {
234+
"type": "AzureFileStorage",
235+
"typeProperties": {
236+
"serviceEndpoint": "https://<accountName>.file.core.windows.net/",
237+
"fileShare": "<file share name>"
238+
}
239+
}
240+
}
241+
```
242+
243+
### User-assigned managed identity authentication
244+
245+
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)
246+
247+
To use user-assigned managed identity authentication, follow these steps:
248+
249+
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).
250+
251+
- **As source**, in **Access control (IAM)**, grant at least the **Storage File Data SMB Share Reader** role.
252+
- **As sink**, in **Access control (IAM)**, grant at least the **Storage File Data SMB Share Contributor** role.
253+
254+
2. Assign one or multiple user-assigned managed identities to your data factory and [create credentials](credentials.md) for each user-assigned managed identity.
255+
256+
These properties are supported for an Azure Files linked service:
257+
258+
| Property | Description | Required |
259+
|:--- |:--- |:--- |
260+
| type | The **type** property must be set to **AzureFileStorage**. | Yes |
261+
| serviceEndpoint | Specify the Azure Files service endpoint with the pattern of `https://<accountName>.file.core.windows.net/`. | Yes |
262+
| credentials | Specify the user-assigned managed identity as the credential object. | Yes |
263+
| fileShare | Specify the file share. | Yes |
264+
265+
**Example:**
266+
267+
```json
268+
{
269+
"name": "AzureFileStorageLinkedService",
270+
"properties": {
271+
"type": "AzureFileStorage",
272+
"typeProperties": {
273+
"serviceEndpoint": "https://<accountName>.file.core.windows.net/",
274+
"credential": {
275+
"referenceName": "credential1",
276+
"type": "CredentialReference"
277+
},
278+
"fileShare": "<file share name>"
279+
}
280+
}
281+
}
282+
```
283+
205284
### Legacy model
206285

207286
| Property | Description | Required |

0 commit comments

Comments
 (0)