You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception message:
Received a non-retryable error. Identity Response Code: BadRequest, Response: {"error":{"code":"UnsupportedApiVersion","message":"The HTTP resource that matches the request URI 'http://localhost:8081/msi/token?resource=https://database.windows.net/&api-version=2019-08-01' does not support the API version '2019-08-01'.","innerError":null}}
Stack trace:
System.AggregateException:
at Microsoft.Data.ProviderBase.DbConnectionPool.CheckPoolBlockingPeriod (Microsoft.Data.SqlClient, Version=2.0.20168.4, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5)
at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject (Microsoft.Data.SqlClient, Version=2.0.20168.4, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5)
at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest (Microsoft.Data.SqlClient, Version=2.0.20168.4, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5)
at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection (Microsoft.Data.SqlClient, Version=2.0.20168.4, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5)
at Microsoft.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen (Microsoft.Data.SqlClient, Version=2.0.20168.4, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5)
...
To reproduce
Include a complete code listing (or project/solution) that we can run to reproduce the issue.
Partial code listings, or multiple fragments of code, will slow down our response or cause us to push the issue back to you to provide code to reproduce the issue.
There's an open issue for Azure Identity dependency work we'll be doing soon (#771)
To summarize, it wasn't possible in the last release as Azure Identity doesn't support net46 and dropping net46 support wasn't possible in release v2.1.x for SqlClient.
This has been fixed with the latest release v3.0.0-preview2. The driver now depends on Azure.Identity to acquire access token for Managed Identity based authentication. Release notes
Describe the bug
Using the "2017-09-01" Azure Managed Identity API version is required on Azure Functions Linux Consumption hosting plans. Current implementation uses version 2019-08-01 which produces the following exception:
To reproduce
Include a complete code listing (or project/solution) that we can run to reproduce the issue.
Partial code listings, or multiple fragments of code, will slow down our response or cause us to push the issue back to you to provide code to reproduce the issue.
Expected behavior
Database connection is open.
Further technical details
Microsoft.Data.SqlClient version: 2.1.1
.NET target: Core 3.1.10
SQL Server version: Azure SQL
Operating system: Azure Functions Linux Consumption hosting plan
The text was updated successfully, but these errors were encountered: