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
title: Integrate Azure Files with Service Connector
3
-
description: Integrate Azure Files into your application with Service Connector
3
+
description: Integrate Azure Files into your application by using Service Connector.
4
4
author: maud-lv
5
5
ms.author: malev
6
6
ms.service: service-connector
7
7
ms.topic: how-to
8
-
ms.date: 02/02/2024
8
+
ms.date: 06/07/2026
9
+
#customer intent: As an Azure app developer, I want to see authentication methods, environment variables, and sample code for connecting Azure Files, so I can integrate Azure Files into my Azure apps.
9
10
---
10
11
11
12
# Integrate Azure Files with Service Connector
12
13
13
-
This page shows supported authentication methods and clients, and shows sample code you can use to connect Azure File Storage to other cloud services using Service Connector. You might still be able to connect to Azure File Storage in other programming languages without using Service Connector. This page also shows default environment variable names and values (or Spring Boot configuration) you get when you create the service connection.
14
+
This article shows supported clients, authentication methods, and sample code you can use to connect Azure Files to other Azure services using Service Connector. This article also shows the default environment variables you need to create the service connections.
15
+
16
+
>[!NOTE]
17
+
>You might be able to connect to Azure Files in other programming languages without using Service Connector.
14
18
15
19
## Supported compute services
16
20
17
-
Service Connector can be used to connect the following compute services to Azure Files:
21
+
You can use Service Connector to connect the following Azure compute services to Azure Files:
18
22
19
23
- Azure App Service
20
24
- Azure Container Apps
21
25
- Azure Functions
22
26
- Azure Kubernetes Service (AKS)
23
27
- Azure Spring Apps
24
28
25
-
## Supported authentication types and client types
29
+
## Supported clients and authentication type
30
+
31
+
Azure Files supports the following client types:
32
+
33
+
- .NET
34
+
- Java
35
+
- Java Spring Boot
36
+
- Node.js
37
+
- Python
38
+
- PHP
39
+
- Ruby
26
40
27
-
The table below shows which combinations of authentication methods and clients are supported for connecting your compute service to Azure Files using Service Connector. A “Yes” indicates that the combination is supported, while a “No” indicates that it is not supported.
41
+
Azure Files supports only secret or connection string authentication. System-assigned managed identity, user-assigned managed identity, and service principal authentication aren't available.
28
42
29
-
| Client Type | System-assigned managed identity | User-assigned managed identity | Secret / connection string | Service principal |
> The secret or connection string authentication flow requires a high degree of trust in the application, and carries risks not present in other flows. You should use this flow only when more secure flows, such as managed identities, aren't available.
39
45
40
-
This table indicates that the only supported authentication method for all client types is the Secret / connection string method. The System-assigned managed identity, User-assigned managed identity, and Service principal methods are not supported for any of the client types to connect to Azure Files.
46
+
## Default environment variables
41
47
42
-
## Default environment variable names or application properties and sample code
48
+
Use the following connection details to connect supported Azure compute services to Azure Files. In the values, replace the following placeholders with the values for your app:
43
49
44
-
Use the connection details below to connect compute services to Azure File Storage. For each example below, replace the placeholder texts `<account-name>`, `<account-key>`, `<storage-account-name>` and `<storage-account-key>` with your own account name, account key, storage account name, and storage account key. For more information about naming conventions, check the [Service Connector internals](concept-service-connector-internals.md#configuration-naming-convention) article.
50
+
-`<account-name>`
51
+
-`<account-key>`
52
+
-`<storage-account-name>`
53
+
-`<storage-account-key>`
45
54
46
-
### Connection string
55
+
For more information about naming conventions, see [Configuration naming convention](concept-service-connector-internals.md#configuration-naming-convention).
47
56
48
-
> [!WARNING]
49
-
> Microsoft recommends that you use the most secure authentication flow available. The authentication flow described in this procedure requires a very high degree of trust in the application, and carries risks that are not present in other flows. You should only use this flow when other more secure flows, such as managed identities, aren't viable.
57
+
#### All client types except Spring Boot
50
58
51
-
#### SpringBoot client type
59
+
| Default environment variable name | Description | Example value |
@@ -59,19 +71,13 @@ Use the connection details below to connect compute services to Azure File Stora
59
71
| spring.cloud.azure.storage.fileshare.account-key | File storage account key for Spring Cloud Azure version above 4.0 |`<storage-account-key>`|
60
72
| spring.cloud.azure.storage.fileshare.endpoint | File storage endpoint for Spring Cloud Azure version above 4.0 |`https://<storage-account-name>.file.core.windows.net/`|
61
73
62
-
#### Other client types
63
-
64
-
| Default environment variable name | Description | Example value |
Refer to [Storage File Sample](https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_4.4.1/storage/spring-cloud-azure-starter-storage-file-share/storage-file-sample) to set up your Spring application. Two sets of configuration properties are provided according to the version of Spring Cloud Azure (below 4.0 and above 4.0). For more information, check [Azure Storage File Share Properties](https://microsoft.github.io/spring-cloud-azure/current/reference/html/appendix.html#azure_storage_file_share_proeprties).
53
+
To set up your Spring application, see [Using Spring Cloud Azure Storage File Share Starter](https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_4.4.1/storage/spring-cloud-azure-starter-storage-file-share/storage-file-sample). The sample provides two sets of configuration properties according to the version of Spring Cloud Azure, below 4.0 or above 4.0. For more information, see [Azure Storage File Share Properties](https://microsoft.github.io/spring-cloud-azure/current/reference/html/appendix.html#azure_storage_file_share_proeprties).
49
54
50
55
### [Python](#tab/python)
51
56
52
57
1. Install dependency.
58
+
53
59
```bash
54
60
pip install azure-storage-file-share
55
61
```
56
-
1. Get the connection string from the environment variable added by Service Connector.
62
+
63
+
1. Get the connection string from the Service Connector environment variable.
64
+
57
65
```python
58
66
from azure.storage.fileshare import ShareServiceClient
59
67
@@ -64,10 +72,12 @@ ms.author: wchi
64
72
### [NodeJS](#tab/nodejs)
65
73
66
74
1. Install dependency.
75
+
67
76
```bash
68
77
npm install @azure/storage-file-share
69
78
```
70
-
1. Get the connection string from the environment variable added by Service Connector.
79
+
80
+
1. Get the connection string from the Service Connector environment variable.
For other languages, you can use the connection information that Service Connector sets to the environment variables to connect to Azure File Storage. For environment variable details, see [Integrate Azure Files with Service Connector](../how-to-integrate-storage-file.md).
89
+
### [Others](#tab/none)
90
+
91
+
For other languages, you can use the connection information that Service Connector adds to the environment variables to connect to Azure Files.
0 commit comments