Skip to content

Commit d3a0254

Browse files
committed
draft
1 parent 0eab646 commit d3a0254

2 files changed

Lines changed: 61 additions & 44 deletions

File tree

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,66 @@
11
---
22
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.
44
author: maud-lv
55
ms.author: malev
66
ms.service: service-connector
77
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.
910
---
1011

1112
# Integrate Azure Files with Service Connector
1213

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.
1418
1519
## Supported compute services
1620

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:
1822

1923
- Azure App Service
2024
- Azure Container Apps
2125
- Azure Functions
2226
- Azure Kubernetes Service (AKS)
2327
- Azure Spring Apps
2428

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
2640

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.
2842

29-
| Client Type | System-assigned managed identity | User-assigned managed identity | Secret / connection string | Service principal |
30-
|--------------------|----------------------------------|--------------------------------|----------------------------|-------------------|
31-
| .NET | No | No | Yes | No |
32-
| Java | No | No | Yes | No |
33-
| Java - Spring Boot | No | No | Yes | No |
34-
| Node.js | No | No | Yes | No |
35-
| Python | No | No | Yes | No |
36-
| PHP | No | No | Yes | No |
37-
| Ruby | No | No | Yes | No |
38-
| None | No | No | Yes | No |
43+
> [!IMPORTANT]
44+
> 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.
3945
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
4147

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:
4349

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>`
4554

46-
### Connection string
55+
For more information about naming conventions, see [Configuration naming convention](concept-service-connector-internals.md#configuration-naming-convention).
4756

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
5058

51-
#### SpringBoot client type
59+
| Default environment variable name | Description | Example value |
60+
|------------------------------------|--------------------------------|----------------------------------------------------------------------------------------------------------------------|
61+
| AZURE_STORAGEFILE_CONNECTIONSTRING | File storage connection string | `DefaultEndpointsProtocol=https;AccountName=<account-name>;AccountKey=<account-key>;EndpointSuffix=core.windows.net` |
62+
63+
#### Spring Boot client type
5264

5365
| Application properties | Description | Example value |
5466
| --------------------------- | ------------------------- | --------------------------------------------------------- |
@@ -59,19 +71,13 @@ Use the connection details below to connect compute services to Azure File Stora
5971
| spring.cloud.azure.storage.fileshare.account-key | File storage account key for Spring Cloud Azure version above 4.0 | `<storage-account-key>` |
6072
| 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/` |
6173

62-
#### Other client types
63-
64-
| Default environment variable name | Description | Example value |
65-
|------------------------------------|--------------------------------|----------------------------------------------------------------------------------------------------------------------|
66-
| AZURE_STORAGEFILE_CONNECTIONSTRING | File storage connection string | `DefaultEndpointsProtocol=https;AccountName=<account-name>;AccountKey=<account-key>;EndpointSuffix=core.windows.net` |
74+
## Sample connection code
6775

68-
#### Sample code
69-
Refer to the steps and code below to connect to Azure File Storage using an account key.
70-
[!INCLUDE [code sample for azure files](./includes/code-file-secret.md)]
76+
Use the following steps and sample code to connect to Azure Files using an account key with Service Connector.
7177

72-
## Next steps
78+
[!INCLUDE [code sample for azure files](includes/code-file-secret.md)]
7379

74-
Follow the tutorials listed below to learn more about Service Connector.
80+
## Related content
7581

76-
> [!div class="nextstepaction"]
77-
> [Learn about Service Connector concepts](./concept-service-connector-internals.md)
82+
- [Service Connector concepts](concept-service-connector-internals.md)
83+
- [Configuration naming convention](concept-service-connector-internals.md#configuration-naming-convention)

articles/service-connector/includes/code-file-secret.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@ author: wchigit
33
description: code sample
44
ms.service: service-connector
55
ms.topic: include
6-
ms.date: 11/02/2023
6+
ms.date: 04/07/2026
77
ms.author: wchi
88
---
99

1010
### [.NET](#tab/dotnet)
1111

1212
1. Install dependency.
13+
1314
```bash
1415
dotnet add package Azure.Storage.Files.Shares --version 12.16.0
1516
```
16-
1. Get the connection string from the environment variable added by Service Connector.
17+
18+
1. Get the connection string from the Service Connector environment variable.
1719

1820
```csharp
1921
using System;
@@ -23,18 +25,21 @@ ms.author: wchi
2325
var connectionString = Environment.GetEnvironmentVariable("AZURE_STORAGEFILE_CONNECTIONSTRING");
2426
ShareServiceClient service = new ShareServiceClient(connectionString)
2527
```
26-
28+
2729
### [Java](#tab/java)
2830

2931
1. Add the following dependency in your *pom.xml* file:
32+
3033
```xml
3134
<dependency>
3235
<groupId>com.azure</groupId>
3336
<artifactId>azure-storage-file-share</artifactId>
3437
<version>12.20.1</version>
3538
</dependency>
3639
```
40+
3741
1. Get the connection string from the environment variable added by Service Connector.
42+
3843
```java
3944
import com.azure.storage.file.share.*;
4045
@@ -43,17 +48,20 @@ ms.author: wchi
4348
.connectionString(CONNECTION_STRING).buildClient();
4449
```
4550

46-
### [SpringBoot](#tab/springBoot)
51+
### [Spring Boot](#tab/springBoot)
4752

48-
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).
4954

5055
### [Python](#tab/python)
5156

5257
1. Install dependency.
58+
5359
```bash
5460
pip install azure-storage-file-share
5561
```
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+
5765
```python
5866
from azure.storage.fileshare import ShareServiceClient
5967
@@ -64,10 +72,12 @@ ms.author: wchi
6472
### [NodeJS](#tab/nodejs)
6573

6674
1. Install dependency.
75+
6776
```bash
6877
npm install @azure/storage-file-share
6978
```
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.
7181

7282
```javascript
7383
const { ShareServiceClient } = require("@azure/storage-file-share");
@@ -76,5 +86,6 @@ ms.author: wchi
7686
const shareServiceClient = ShareServiceClient.fromConnectionString(connection_string);
7787
```
7888
79-
### [Other](#tab/none)
80-
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

Comments
 (0)