-
Notifications
You must be signed in to change notification settings - Fork 314
Closed
Description
Describe the bug
public ActiveDirectoryAuthenticationProvider()
and public ActiveDirectoryAuthenticationProvider(string applicationClientId)
are not delegating initialization to public ActiveDirectoryAuthenticationProvider(Func<DeviceCodeResult, Task> deviceCodeFlowCallbackMethod, string applicationClientId)
.
Instead of this:
public ActiveDirectoryAuthenticationProvider() => new ActiveDirectoryAuthenticationProvider(DefaultDeviceFlowCallback);
public ActiveDirectoryAuthenticationProvider(string applicationClientId) => new ActiveDirectoryAuthenticationProvider(DefaultDeviceFlowCallback, applicationClientId);
it should be:
public ActiveDirectoryAuthenticationProvider() : this(DefaultDeviceFlowCallback) {}
public ActiveDirectoryAuthenticationProvider(string applicationClientId) : this(DefaultDeviceFlowCallback, applicationClientId) {}
To reproduce
var provider = new ActiveDirectoryAuthenticationProvider("<my app ID>");
SqlAuthenticationProvider.SetProvider(SqlAuthenticationMethod.ActiveDirectoryInteractive, provider);
provider
still uses the default client app ID 2fd908ad-0664-4344-b9be-cd3e8b574c38
instead of <my app ID>
.
Expected behavior
New ActiveDirectoryAuthenticationProvider
instances should use the client app ID specified in the constructor argument.
Further technical details
Microsoft.Data.SqlClient version: 3.0.1
.NET target: net472, netcoreapp3.1, net5.0
SQL Server version: n/a
Operating system: Windows 10 Enterprise Build 19043
Additional context
None.
Metadata
Metadata
Assignees
Labels
No labels