Skip to content

Commit c8ee5b1

Browse files
authored
feat: add support for mssql server DefaultAzureCredential usage (#10246)
1 parent 7adbc9b commit c8ee5b1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/driver/sqlserver/SqlServerConnectionCredentialsOptions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { DefaultAuthentication } from "./authentication/DefaultAuthentication"
22
import { AzureActiveDirectoryAccessTokenAuthentication } from "./authentication/AzureActiveDirectoryAccessTokenAuthentication"
3+
import { AzureActiveDirectoryDefaultAuthentication } from "./authentication/AzureActiveDirectoryDefaultAuthentication"
34
import { AzureActiveDirectoryMsiAppServiceAuthentication } from "./authentication/AzureActiveDirectoryMsiAppServiceAuthentication"
45
import { AzureActiveDirectoryMsiVmAuthentication } from "./authentication/AzureActiveDirectoryMsiVmAuthentication"
56
import { AzureActiveDirectoryPasswordAuthentication } from "./authentication/AzureActiveDirectoryPasswordAuthentication"
@@ -10,6 +11,7 @@ export type SqlServerConnectionCredentialsAuthenticationOptions =
1011
| DefaultAuthentication
1112
| NtlmAuthentication
1213
| AzureActiveDirectoryAccessTokenAuthentication
14+
| AzureActiveDirectoryDefaultAuthentication
1315
| AzureActiveDirectoryMsiAppServiceAuthentication
1416
| AzureActiveDirectoryMsiVmAuthentication
1517
| AzureActiveDirectoryPasswordAuthentication
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export interface AzureActiveDirectoryDefaultAuthentication {
2+
/**
3+
* This uses DefaultAzureCredential from @azure/identity to try multiple methods of authentication
4+
*/
5+
type: "azure-active-directory-default"
6+
options: {
7+
/**
8+
* The clientId of the user you want to log in with, mapped to the managedIdentityClientId in tedious
9+
*/
10+
clientId?: string
11+
}
12+
}

0 commit comments

Comments
 (0)