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.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應