Skip to content

Commit

Permalink
Updated readme.md, added azure active directory configurations in the…
Browse files Browse the repository at this point in the history
… formats example
  • Loading branch information
Shin-Aska authored and dhensby committed Oct 31, 2022
1 parent 9e1fc42 commit 0311162
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,12 +571,36 @@ Complete list of pool options can be found [here](https://github.com/vincit/tarn
In addition to configuration object there is an option to pass config as a connection string. Connection strings are supported.

##### Classic Connection String
###### Standard configuration using tedious driver

```
Server=localhost,1433;Database=database;User Id=username;Password=password;Encrypt=true
```
###### Standard configuration using msnodesqlv8 driver
```
Driver=msnodesqlv8;Server=(local)\INSTANCE;Database=database;UID=DOMAIN\username;PWD=password;Encrypt=true
```

##### Azure Active Directory Authentication Connection String

Several types of Azure Authentication are supported:
###### Authentication using Default Azure Credentials
```
Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-default;ClientID=clientid;Encrypt=true
```
###### Authentication using Active Directory Password
```
Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-password;User Id=username;Password=password;ClientID=clientid;TenantID=tenantid;Encrypt=true
```
###### Authentication using Access Token
```
Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-access-token;Token=token;Encrypt=true
```
###### Authentication using Service Principal
```
Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-service-principal-secret;ClientID=clientid;ClientSecret=clientsecret;TenantID=tenantid;Encrypt=true
```

## Drivers

### Tedious
Expand Down Expand Up @@ -2097,4 +2121,4 @@ to create new connections or not
[appveyor-url]: https://ci.appveyor.com/project/tediousjs/node-mssql

[tedious-url]: https://www.npmjs.com/package/tedious
[msnodesqlv8-url]: https://www.npmjs.com/package/msnodesqlv8
[msnodesqlv8-url]: https://www.npmjs.com/package/msnodesqlv8

0 comments on commit 0311162

Please sign in to comment.