Share via


ActiveDirectoryAuthenticationProvider Class

Definition

This class implements SqlAuthenticationProvider and is used for active directory federated authentication mechanisms.

public ref class ActiveDirectoryAuthenticationProvider sealed : Microsoft::Data::SqlClient::SqlAuthenticationProvider
public sealed class ActiveDirectoryAuthenticationProvider : Microsoft.Data.SqlClient.SqlAuthenticationProvider
type ActiveDirectoryAuthenticationProvider = class
    inherit SqlAuthenticationProvider
Public NotInheritable Class ActiveDirectoryAuthenticationProvider
Inherits SqlAuthenticationProvider
Inheritance
ActiveDirectoryAuthenticationProvider

Constructors

ActiveDirectoryAuthenticationProvider()

Initializes the ActiveDirectoryAuthenticationProvider class.

ActiveDirectoryAuthenticationProvider(Func<DeviceCodeResult,Task>, String)

Initializes the ActiveDirectoryAuthenticationProvider class with the provided device code flow callback method and application client id.

ActiveDirectoryAuthenticationProvider(String)

Initializes the ActiveDirectoryAuthenticationProvider class with the provided application client id.

Methods

AcquireTokenAsync(SqlAuthenticationParameters)

Acquires a security token from the authority.

BeforeLoad(SqlAuthenticationMethod)

This method is called immediately before the provider is added to authentication provider registry.

BeforeUnload(SqlAuthenticationMethod)

This method is called immediately before the provider is removed from the authentication provider registry.

ClearUserTokenCache()

Clears cached user tokens from the token provider.

IsSupported(SqlAuthenticationMethod)

Indicates whether the specified authentication method is supported.

SetAcquireAuthorizationCodeAsyncCallback(Func<Uri,Uri,CancellationToken,Task<Uri>>)

Sets a callback method which is invoked with a custom Web UI instance that will let the user sign-in with Azure Active Directory, present consent if needed, and get back the authorization code. Applicable when working with Active Directory Interactive authentication.

SetDeviceCodeFlowCallback(Func<DeviceCodeResult,Task>)

Sets the callback method, overriding the default implementation that processes the result for 'Active Directory Device Code Flow' authentication.

SetIWin32WindowFunc(Func<IWin32Window>)

Sets a reference to the current IWin32Window that triggers the browser to be shown. Used to center the browser pop-up onto this window."

SetParentActivityOrWindowFunc(Func<Object>)

Sets a reference to the ViewController (if using Xamarin.iOS), Activity (if using Xamarin.Android) IWin32Window or IntPtr (if using .NET Framework). Used for invoking the browser for Active Directory Interactive authentication.

Applies to