FSharp.Data.SqlClient
FSharp.Data.SqlClient copied to clipboard
Support for 'Active Directory Interactive' authentication
problem
Try to connect to an Azure SQL database using the Active Directory Interactive authentication scheme.
open FSharp.Data
[<Literal>]
let connectionString = @"Data Source=asdf.database.usgovcloudapi.net;Initial Catalog=asdf;User [email protected];Authentication='Active Directory Interactive';TrustServerCertificate=True;Connect Timeout=30"
do
use cmd = new SqlCommandProvider<"select * from records", connectionString>(connectionString)
cmd.Execute(topN = 3L)
This provides the following error message:
Severity Code Description Project File Line Suppression State
Error FS3033 The type provider 'FSharp.Data.SqlCommandProvider' reported an error: Cannot find an authentication provider for 'ActiveDirectoryInteractive'. CopyDataDbToDb C:\projects2\CopyDataDbToDb\CopyDataDbToDb\Program.fs 7 Active
solution
Ideally, that the authentication scheme is supported
more info
For now, I have copied the DB onto my local machine so I can work with it, but the data will quickly become stale.
What you can do
- [ ] I consider contributing the feature
- [x] I consider help in testing the feature
@sachinshahredmane, could you confirm you can connect to the same database using a plain SqlConnection from System.Data.SqlClient namespace with the same connection string?
I was only able to connect using the Microsoft.Data.SqlClient namespace. Any chance of upgrading to that driver?
Well, I just found #374 so I think I will wait to see if/how things develop.