{"id":15419263,"url":"https://github.com/cheenamalhotra/samplesqlauthprovider","last_synced_at":"2026-05-10T23:46:44.662Z","repository":{"id":217608326,"uuid":"618516445","full_name":"cheenamalhotra/SampleSqlAuthProvider","owner":"cheenamalhotra","description":"Sample implementation of SqlAuthenticationProvider using MSAL for System.Data.SqlClient and Microsoft.Data.SqlClient","archived":false,"fork":false,"pushed_at":"2024-01-17T04:40:13.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-09T05:39:34.597Z","etag":null,"topics":["activedirectory","authentication","dotnet-framework","interactive","sqlclient"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cheenamalhotra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-03-24T16:30:32.000Z","updated_at":"2023-03-28T08:49:51.000Z","dependencies_parsed_at":"2024-01-17T13:12:11.301Z","dependency_job_id":null,"html_url":"https://github.com/cheenamalhotra/SampleSqlAuthProvider","commit_stats":null,"previous_names":["cheenamalhotra/samplesqlauthprovider"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheenamalhotra%2FSampleSqlAuthProvider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheenamalhotra%2FSampleSqlAuthProvider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheenamalhotra%2FSampleSqlAuthProvider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheenamalhotra%2FSampleSqlAuthProvider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cheenamalhotra","download_url":"https://codeload.github.com/cheenamalhotra/SampleSqlAuthProvider/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240850958,"owners_count":19867957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activedirectory","authentication","dotnet-framework","interactive","sqlclient"],"created_at":"2024-10-01T17:24:35.175Z","updated_at":"2026-05-10T23:46:39.626Z","avatar_url":"https://github.com/cheenamalhotra.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Sql Authentication Provider implementation\n\nThis repository provides a sample implementation of [SqlAuthenticationProvider]() that can be used for `ActiveDirectoryInteractive` authentication mode with System.Data.SqlClient as well as Microsoft.Data.SqlClient (with namespace toggle).\n\nThe `CustomAuthProvider` implements `SqlAuthenticationProvider` and the authentication is performed using MSAL (Microsoft.Identity.Client).\n\n## Configure the sample\n\nProvide details in the sample in the `Program.cs` file:\n- `appClientId`: Application Client ID of First Party App to be used for authentication (by default SqlClient's client id is used)\n- `appName`: Name of client application\n- Connection string details\n  - `DataSource`: Target Azure SQL Server endpoint\n  - `InitialCatalog`: Name of Azure Database instance\n  - `UserID`: Username for silent authentication (applicable when cache is persisted)\n\n## How to build the sample\n\n- Using Visual Studio, Build the solution.\n- Using Dotnet CLI, run `dotnet build`\n\n## How to run the sample\n\n- Run the exe: `bin\\net48\\SampleSqlAuthProvider.exe`\n- Using Dotnet CLI, run `dotnet run`\n\n## Porting to Microsoft.Data.SqlClient\n\nMicrosoft.Data.SqlClient package is referenced in the sample, and to use that, comment out the `using System.Data.SqlClient` namespaces and uncomment `using Microsoft.Data.SqlClient` in below files:\n- Program.cs\n- CustomAuthProvider.cs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheenamalhotra%2Fsamplesqlauthprovider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheenamalhotra%2Fsamplesqlauthprovider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheenamalhotra%2Fsamplesqlauthprovider/lists"}