Skip to content

Commit f061d37

Browse files
authored
Merge pull request #257861 from wchigit/how-to-sql
[SCOPED] Remove unsupported client types for integration with SQL
2 parents 25c1f87 + 813c028 commit f061d37

File tree

3 files changed

+38
-102
lines changed

3 files changed

+38
-102
lines changed

articles/service-connector/how-to-integrate-sql-database.md

Lines changed: 24 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,27 @@ Use the connection details below to connect compute services to Azure SQL Databa
4545

4646
### System-assigned Managed Identity
4747

48-
#### [.NET](#tab/dotnet)
48+
#### [.NET](#tab/sql-me-id-dotnet)
4949
> [!div class="mx-tdBreakAll"]
5050
> | Default environment variable name | Description | Sample value |
5151
> | --------------------------------- | ------------| ------------ |
5252
> | `AZURE_SQL_CONNECTIONSTRING` | Azure SQL Database connection string | `Data Source=<sql-server>.database.windows.net,1433;Initial Catalog=<sql-database>;Authentication=ActiveDirectoryManagedIdentity` |
5353
54-
#### [Java](#tab/java)
54+
#### [Java](#tab/sql-me-id-java)
5555

5656
> [!div class="mx-tdBreakAll"]
5757
> | Default environment variable name | Description | Sample value |
5858
> |-----------------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
5959
> | `AZURE_SQL_CONNECTIONSTRING` | Azure SQL Database connection string | `jdbc:sqlserver://<sql-server>.database.windows.net:1433;databaseName=<sql-database>;authentication=ActiveDirectoryMSI;` |
6060
61-
#### [SpringBoot](#tab/spring)
61+
#### [SpringBoot](#tab/sql-me-id-spring)
6262

6363
> [!div class="mx-tdBreakAll"]
6464
> | Default environment variable name | Description | Sample value |
6565
> |-----------------------------------|----------------------------------------|--------------------------------------------------------------------------------------------------------------------|
6666
> | `spring.datasource.url` | Azure SQL Database datasource URL | `jdbc:sqlserver://<sql-server>.database.windows.net:1433;databaseName=<sql-db>;authentication=ActiveDirectoryMSI;` |
6767
68-
#### [Python](#tab/python)
68+
#### [Python](#tab/sql-me-id-python)
6969

7070
> [!div class="mx-tdBreakAll"]
7171
> | Default environment variable name | Description | Sample value |
@@ -75,15 +75,7 @@ Use the connection details below to connect compute services to Azure SQL Databa
7575
> | `AZURE_SQL_DATABASE` | Azure SQL Database database | `<sql-database>` |
7676
> | `AZURE_SQL_AUTHENTICATION` | Azure SQL authentication | `ActiveDirectoryMsi` |
7777
78-
#### [Django](#tab/django)
79-
80-
The client type `Django` is not supported for system-assigned managed identity.
81-
82-
#### [Go](#tab/go)
83-
84-
The client type `Go` is not supported for system-assigned managed identity.
85-
86-
#### [NodeJS](#tab/nodejs)
78+
#### [NodeJS](#tab/sql-me-id-nodejs)
8779

8880
> [!div class="mx-tdBreakAll"]
8981
> | Default environment variable name | Description | Sample value |
@@ -93,14 +85,6 @@ The client type `Go` is not supported for system-assigned managed identity.
9385
> | `AZURE_SQL_DATABASE` | Azure SQL Database database | `<sql-database>` |
9486
> | `AZURE_SQL_AUTHENTICATIONTYPE` | Azure SQL Database authentication type | `azure-active-directory-default` |
9587
96-
#### [PHP](#tab/php)
97-
98-
The client type `PHP` is not supported for system-assigned managed identity.
99-
100-
#### [Ruby](#tab/ruby)
101-
102-
The client type `Ruby` is not supported for system-assigned managed identity.
103-
10488
---
10589

10690
#### Sample code
@@ -111,28 +95,28 @@ Refer to the steps and code below to connect to Azure SQL Database using a syste
11195

11296
### User-assigned managed identity
11397

114-
#### [.NET](#tab/dotnet)
98+
#### [.NET](#tab/sql-me-id-dotnet)
11599

116100
> [!div class="mx-tdBreakAll"]
117101
> | Default environment variable name | Description | Sample value |
118102
> | --------------------------------- | ------------| ------------ |
119103
> | `AZURE_SQL_CONNECTIONSTRING` | Azure SQL Database connection string | `Data Source=<sql-server>.database.windows.net,1433;Initial Catalog=<sql-database>;User ID=<identity-client-ID>;Authentication=ActiveDirectoryManagedIdentity` |
120104
121-
#### [Java](#tab/java)
105+
#### [Java](#tab/sql-me-id-java)
122106

123107
> [!div class="mx-tdBreakAll"]
124108
> | Default environment variable name | Description | Sample value |
125109
> |-----------------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
126110
> | `AZURE_SQL_CONNECTIONSTRING` | Azure SQL Database connection string | `jdbc:sqlserver://<sql-server>.database.windows.net:1433;databaseName=<sql-database>;msiClientId=<msiClientId>;authentication=ActiveDirectoryMSI;` |
127111
128-
#### [SpringBoot](#tab/spring)
112+
#### [SpringBoot](#tab/sql-me-id-spring)
129113

130114
> [!div class="mx-tdBreakAll"]
131115
> | Default environment variable name | Description | Sample value |
132116
> |-----------------------------------|----------------------------------------|--------------------------------------------------------------------------------------------------------------------|
133117
> | `spring.datasource.url` | Azure SQL Database datasource URL | `jdbc:sqlserver://<sql-server>.database.windows.net:1433;databaseName=<sql-db>;msiClientId=<msiClientId>;authentication=ActiveDirectoryMSI;` |
134118
135-
#### [Python](#tab/python)
119+
#### [Python](#tab/sql-me-id-python)
136120

137121
> [!div class="mx-tdBreakAll"]
138122
> | Default environment variable name | Description | Sample value |
@@ -143,15 +127,7 @@ Refer to the steps and code below to connect to Azure SQL Database using a syste
143127
> | `AZURE_SQL_USER` | Azure SQL Database user | `Object (principal) ID` |
144128
> | `AZURE_SQL_AUTHENTICATION` | Azure SQL authentication | `ActiveDirectoryMsi` |
145129
146-
#### [Django](#tab/django)
147-
148-
The client type `Django` is not supported for user-assigned managed identity.
149-
150-
#### [Go](#tab/go)
151-
152-
The client type `Go` is not supported for user-assigned managed identity.
153-
154-
#### [NodeJS](#tab/nodejs)
130+
#### [NodeJS](#tab/sql-me-id-nodejs)
155131

156132
> [!div class="mx-tdBreakAll"]
157133
> | Default environment variable name | Description | Sample value |
@@ -162,14 +138,6 @@ The client type `Go` is not supported for user-assigned managed identity.
162138
> | `AZURE_SQL_AUTHENTICATIONTYPE` | Azure SQL Database authentication type | `azure-active-directory-default` |
163139
> | `AZURE_SQL_CLIENTID` | Azure SQL Database client ID | `<identity-client-ID>` |
164140
165-
#### [PHP](#tab/php)
166-
167-
The client type `PHP` is not supported for user-assigned managed identity.
168-
169-
#### [Ruby](#tab/ruby)
170-
171-
The client type `Ruby` is not supported for user-assigned managed identity.
172-
173141
---
174142

175143
#### Sample code
@@ -180,21 +148,21 @@ Refer to the steps and code below to connect to Azure SQL Database using a user-
180148

181149
### Connection String
182150

183-
#### [.NET](#tab/dotnet)
151+
#### [.NET](#tab/sql-secret-dotnet)
184152

185153
> [!div class="mx-tdBreakAll"]
186154
> | Default environment variable name | Description | Sample value |
187155
> | --------------------------------- | ------------| ------------ |
188156
> | `AZURE_SQL_CONNECTIONSTRING` | Azure SQL Database connection string | `Data Source=<sql-server>.database.windows.net,1433;Initial Catalog=<sql-database>;Password=<sql-password>` |
189157
190-
#### [Java](#tab/java)
158+
#### [Java](#tab/sql-secret-java)
191159

192160
> [!div class="mx-tdBreakAll"]
193161
> | Default environment variable name | Description | Sample value |
194162
> | --------------------------------- | ------------| ------------ |
195163
> | `AZURE_SQL_CONNECTIONSTRING` | Azure SQL Database connection string | `jdbc:sqlserver://<sql-server>.database.windows.net:1433;databaseName=<sql-database>;user=<sql-username>;password=<sql-password>;` |
196164
197-
#### [SpringBoot](#tab/spring)
165+
#### [SpringBoot](#tab/sql-secret-spring)
198166

199167
> [!div class="mx-tdBreakAll"]
200168
> | Default environment variable name | Description | Sample value |
@@ -203,7 +171,7 @@ Refer to the steps and code below to connect to Azure SQL Database using a user-
203171
> | `spring.datasource.username` | Azure SQL Database datasource username | `<sql-user>` |
204172
> | `spring.datasource.password` | Azure SQL Database datasource password | `<sql-password>` |
205173
206-
#### [Python](#tab/python)
174+
#### [Python](#tab/sql-secret-python)
207175

208176
> [!div class="mx-tdBreakAll"]
209177
> | Default environment variable name | Description | Sample value |
@@ -214,7 +182,7 @@ Refer to the steps and code below to connect to Azure SQL Database using a user-
214182
> | `AZURE_SQL_USER` | Azure SQL Database user | `<sql-username>` |
215183
> | `AZURE_SQL_PASSWORD` | Azure SQL Database password | `<sql-password>` |
216184
217-
#### [Django](#tab/django)
185+
#### [Django](#tab/sql-secret-django)
218186

219187
> [!div class="mx-tdBreakAll"]
220188
> | Default environment variable name | Description | Sample value |
@@ -225,14 +193,14 @@ Refer to the steps and code below to connect to Azure SQL Database using a user-
225193
> | `AZURE_SQL_USER` | Azure SQL Database user | `<sql-username>` |
226194
> | `AZURE_SQL_PASSWORD` | Azure SQL Database password | `<sql-password>` |
227195
228-
#### [Go](#tab/go)
196+
#### [Go](#tab/sql-secret-go)
229197

230198
> [!div class="mx-tdBreakAll"]
231199
> | Default environment variable name | Description | Sample value |
232200
> |-----------------------------------|--------------------------------------|------------------------------------------------------------------------------------------------------------------------------|
233201
> | `AZURE_SQL_CONNECTIONSTRING` | Azure SQL Database connection string | `server=<sql-server>.database.windows.net;port=1433;database=<sql-database>;user id=<sql-username>;password=<sql-password>;` |
234202
235-
#### [NodeJS](#tab/nodejs)
203+
#### [NodeJS](#tab/sql-secret-nodejs)
236204

237205
> [!div class="mx-tdBreakAll"]
238206
> | Default environment variable name | Description | Sample value |
@@ -243,7 +211,7 @@ Refer to the steps and code below to connect to Azure SQL Database using a user-
243211
> | `AZURE_SQL_USERNAME` | Azure SQL Database username | `<sql-username>` |
244212
> | `AZURE_SQL_PASSWORD` | Azure SQL Database password | `<sql-password>` |
245213
246-
#### [PHP](#tab/php)
214+
#### [PHP](#tab/sql-secret-php)
247215

248216
> [!div class="mx-tdBreakAll"]
249217
> | Default environment variable name | Description | Sample value |
@@ -253,7 +221,7 @@ Refer to the steps and code below to connect to Azure SQL Database using a user-
253221
> | `AZURE_SQL_UID` | Azure SQL Database unique identifier (UID) | `<sql-username>` |
254222
> | `AZURE_SQL_PASSWORD` | Azure SQL Database password | `<sql-password>` |
255223
256-
#### [Ruby](#tab/ruby)
224+
#### [Ruby](#tab/sql-secret-ruby)
257225

258226
> [!div class="mx-tdBreakAll"]
259227
> | Default environment variable name | Description | Sample value |
@@ -274,7 +242,7 @@ Refer to the steps and code below to connect to Azure SQL Database using a conne
274242

275243
### Service Principal
276244

277-
#### [.NET](#tab/dotnet)
245+
#### [.NET](#tab/sql-me-id-dotnet)
278246

279247
> [!div class="mx-tdBreakAll"]
280248
> | Default environment variable name | Description | Example value |
@@ -284,15 +252,15 @@ Refer to the steps and code below to connect to Azure SQL Database using a conne
284252
> | `AZURE_SQL_TENANTID` | Your tenant ID | `<tenant-ID>` |
285253
> | `AZURE_SQL_CONNECTIONSTRING` | Azure SQL Database connection string | `Data Source=<sql-server>.database.windows.net,1433;Initial Catalog=<sql-database>;User ID=a30eeedc-e75f-4301-b1a9-56e81e0ce99c;Password=asdfghwerty;Authentication=ActiveDirectoryServicePrincipal` |
286254
287-
#### [Java](#tab/java)
255+
#### [Java](#tab/sql-me-id-java)
288256

289257
> [!div class="mx-tdBreakAll"]
290258
> | Default environment variable name | Description | Sample value |
291259
> |-----------------------------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------|
292260
> | `AZURE_SQL_CONNECTIONSTRING` | Azure SQL Database connection string | `jdbc:sqlserver://<sql-server>.database.windows.net:1433;databaseName=<sql-database>;user=<client-Id>;password=<client-secret>;authentication=ActiveDirectoryServicePrincipal;` |
293261
294262

295-
#### [SpringBoot](#tab/spring)
263+
#### [SpringBoot](#tab/sql-me-id-spring)
296264

297265
> [!div class="mx-tdBreakAll"]
298266
> | Default environment variable name | Description | Sample value |
@@ -302,7 +270,7 @@ Refer to the steps and code below to connect to Azure SQL Database using a conne
302270
> | `spring.datasource.password` | Azure SQL Database datasource password | `<client-Secret>` |
303271
304272

305-
#### [Python](#tab/python)
273+
#### [Python](#tab/sql-me-id-python)
306274

307275
> [!div class="mx-tdBreakAll"]
308276
> | Default environment variable name | Description | Sample value |
@@ -314,15 +282,8 @@ Refer to the steps and code below to connect to Azure SQL Database using a conne
314282
> | `AZURE_SQL_AUTHENTICATION` | Azure SQL authentication | `ActiveDirectoryServerPrincipal` |
315283
> | `AZURE_SQL_PASSWORD` | Azure SQL Database password | `your Client Secret` |
316284
317-
#### [Django](#tab/django)
318-
319-
The client type `Django` is not supported for service principal.
320-
321-
#### [Go](#tab/go)
322285

323-
The client type `Go` is not supported for service principal.
324-
325-
#### [NodeJS](#tab/nodejs)
286+
#### [NodeJS](#tab/sql-me-id-nodejs)
326287

327288
> [!div class="mx-tdBreakAll"]
328289
> | Default environment variable name | Description | Sample value |
@@ -335,14 +296,6 @@ The client type `Go` is not supported for service principal.
335296
> | `AZURE_SQL_CLIENTSECRET` | Azure SQL Database client Secret | `<your Client Secret >` |
336297
> | `AZURE_SQL_TENANTID` | Azure SQL Database Tenant ID | `<your Tenant ID>` |
337298
338-
#### [PHP](#tab/php)
339-
340-
The client type `PHP` is not supported for service principal.
341-
342-
#### [Ruby](#tab/ruby)
343-
344-
The client type `Ruby` is not supported for service principal.
345-
346299
---
347300

348301
#### Sample code

articles/service-connector/includes/code-sql-me-id.md

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.author: xiaofanzhou
77
---
88

99

10-
### [.NET](#tab/dotnet)
10+
### [.NET](#tab/sql-me-id-dotnet)
1111

1212
1. Install dependencies.
1313
```bash
@@ -27,7 +27,7 @@ ms.author: xiaofanzhou
2727
```
2828
For more information, see [Using Active Directory Managed Identity authentication](/sql/connect/ado-net/sql/azure-active-directory-authentication#using-active-directory-managed-identity-authentication).
2929

30-
### [Java](#tab/java)
30+
### [Java](#tab/sql-me-id-java)
3131

3232
Get the Azure SQL Database connection string from the environment variable added by Service Connector.
3333

@@ -57,13 +57,13 @@ public class Main {
5757
```
5858
For more information, see [Connect using Microsoft Entra authentication](/sql/connect/jdbc/connecting-using-azure-active-directory-authentication).
5959
60-
### [SpringBoot](#tab/spring)
60+
### [SpringBoot](#tab/sql-me-id-spring)
6161
6262
For a Spring application, if you create a connection with option `--client-type springboot`, Service Connector sets the properties `spring.datasource.url` with value format `jdbc:sqlserver://<sql-server>.database.windows.net:1433;databaseName=<sql-db>;authentication=ActiveDirectoryMSI;` to Azure Spring Apps.
6363
6464
Update your application following the tutorial [Migrate a Java application to use passwordless connections with Azure SQL Database](/azure/developer/java/spring-framework/migrate-sql-database-to-passwordless-connection?tabs=spring%2Capp-service%2Cassign-role-service-connector#2-migrate-the-app-code-to-use-passwordless-connections). Remember to remove the `spring.datasource.password` configuration property if it was set before and add the correct dependencies.
6565
66-
### [Python](#tab/python)
66+
### [Python](#tab/sql-me-id-python)
6767
6868
1. Install dependencies.
6969
```bash
@@ -96,16 +96,7 @@ Update your application following the tutorial [Migrate a Java application to us
9696
conn = pyodbc.connect(connString)
9797
```
9898
99-
100-
### [Django](#tab/django)
101-
102-
The client type `Django` isn't supported for system-assigned managed identity, user-assigned managed identity and service principal.
103-
104-
### [Go](#tab/go)
105-
106-
The client type `Go` isn't supported for system-assigned managed identity, user-assigned managed identity and service principal.
107-
108-
### [NodeJS](#tab/nodejs)
99+
### [NodeJS](#tab/sql-me-id-nodejs)
109100
110101
1. Install dependencies.
111102
```bash
@@ -175,14 +166,6 @@ The client type `Go` isn't supported for system-assigned managed identity, user-
175166
this.poolconnection = await sql.connect(config);
176167
```
177168
178-
### [PHP](#tab/php)
179-
180-
The client type `PHP` isn't supported for system-assigned managed identity, user-assigned managed identity and service principal.
181-
182-
### [Ruby](#tab/ruby)
183-
184-
The client type `Ruby` isn't supported for system-assigned managed identity, user-assigned managed identity and service principal.
185-
186169
---
187170
188171
For more information, see [Homepage for client programming to Microsoft SQL Server](/sql/connect/homepage-sql-connection-programming).

0 commit comments

Comments
 (0)