IPublicClientApplication.AcquireTokenInteractive Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Acquires a token interactively for the specified scopes. Either a system browser, an embedded browser, or a broker will handle this request, depending on the version of .NET framework used and on configuration. For Microsoft Entra applications, a broker is recommended. See Windows Broker. This method does not look in the token cache, but stores the result in it. Before calling this method, use other methods such as AcquireTokenSilent(IEnumerable<String>, IAccount) to check the token cache. See Interactive Authentication.
public Microsoft.Identity.Client.AcquireTokenInteractiveParameterBuilder AcquireTokenInteractive (System.Collections.Generic.IEnumerable<string> scopes);
abstract member AcquireTokenInteractive : seq<string> -> Microsoft.Identity.Client.AcquireTokenInteractiveParameterBuilder
Public Function AcquireTokenInteractive (scopes As IEnumerable(Of String)) As AcquireTokenInteractiveParameterBuilder
Parameters
- scopes
- IEnumerable<String>
Scopes requested to access a protected API.
Returns
A builder enabling you to add optional parameters before executing the token request.
Remarks
The user will be signed-in interactively and will consent to scopes, as well as perform a multi-factor authentication step if such a policy was enabled in the Azure AD tenant.