Skip to content

Commit f1434e7

Browse files
authored
Create README.md (#10191)
1 parent febd3fb commit f1434e7

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/NuGet.Services.Sql/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# NuGet.Services.Sql
2+
3+
A library that provides support for using Entra ID apps for generating tokens for authenticating SQL connections.
4+
Authenticating to Entra ID app is done using certificates, which are automatically refreshed from key vault.
5+
The tokens provided by Entra ID App are cached and reused as long as `AzureSqlConnectionFactory` instance is kept
6+
alive and reused for creating SQL connections.
7+
8+
## Caveats
9+
10+
When used in ASP.NET/ASP.NET Core app in an Azure app service attempts to retrieve a token from Entra ID app might
11+
fail with
12+
13+
> Failed to acquire access token for <DB name>.
14+
15+
With inner exception message:
16+
17+
> The system cannot find the file specified.
18+
19+
thrown by `X509Certificate2` constructor.
20+
21+
This can be worked around by [setting](https://stackoverflow.com/a/62790919) `WEBSITE_LOAD_USER_PROFILE=1` variable for the app service.

0 commit comments

Comments
 (0)