ActiveDirectoryAuthenticationProvider.SetAcquireAuthorizationCodeAsyncCallback Method

Definition

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.

public:
 void SetAcquireAuthorizationCodeAsyncCallback(Func<Uri ^, Uri ^, System::Threading::CancellationToken, System::Threading::Tasks::Task<Uri ^> ^> ^ acquireAuthorizationCodeAsyncCallback);
public void SetAcquireAuthorizationCodeAsyncCallback (Func<Uri,Uri,System.Threading.CancellationToken,System.Threading.Tasks.Task<Uri>> acquireAuthorizationCodeAsyncCallback);
member this.SetAcquireAuthorizationCodeAsyncCallback : Func<Uri, Uri, System.Threading.CancellationToken, System.Threading.Tasks.Task<Uri>> -> unit
Public Sub SetAcquireAuthorizationCodeAsyncCallback (acquireAuthorizationCodeAsyncCallback As Func(Of Uri, Uri, CancellationToken, Task(Of Uri)))

Parameters

acquireAuthorizationCodeAsyncCallback
Func<Uri,Uri,CancellationToken,Task<Uri>>

The callback method to be called by MSAL.NET to delegate the Web user interface with the Secure Token Service (STS).

Remarks

The "authorizationUri" is crafted to leverage PKCE in order to protect the token from a man in the middle attack. Only MSAL.NET can redeem the code. In the event of cancellation, the implementer should return OperationCanceledException.

Applies to