fsprojects / fsprojects/FSharp.Data.SqlClient

Support for 'Active Directory Interactive' authentication

Open
#429 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
F#
Stars
206
Forks
66
PR merge metrics
No merged PRs in 30d

Description

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 ID=abc@def.com;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
  • I consider help in testing the feature

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SqlCommandProvider and trace how the connection string's Authentication value is resolved, focusing on the missing ActiveDirectoryInteractive provider. Reproduce the Azure SQL connection failure, then add coverage for the authentication scheme and verify that the sample connection succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
authentication, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.