PublicClientApplication.AcquireTokenByIntegratedWindowsAuth 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.
Non-interactive request to acquire a security token for the signed-in user in Windows, via Integrated Windows Authentication. See https://aka.ms/msal-net-iwa. The account used in this overrides is pulled from the operating system as the current user principal name.
public Microsoft.Identity.Client.AcquireTokenByIntegratedWindowsAuthParameterBuilder AcquireTokenByIntegratedWindowsAuth (System.Collections.Generic.IEnumerable<string> scopes);
abstract member AcquireTokenByIntegratedWindowsAuth : seq<string> -> Microsoft.Identity.Client.AcquireTokenByIntegratedWindowsAuthParameterBuilder
override this.AcquireTokenByIntegratedWindowsAuth : seq<string> -> Microsoft.Identity.Client.AcquireTokenByIntegratedWindowsAuthParameterBuilder
Public Function AcquireTokenByIntegratedWindowsAuth (scopes As IEnumerable(Of String)) As AcquireTokenByIntegratedWindowsAuthParameterBuilder
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
Implements
Remarks
You can also pass optional parameters by calling: WithUsername(String) to pass the identifier of the user account for which to acquire a token with Integrated Windows authentication. This is generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com. This is normally not needed, but some Windows administrators set policies preventing applications from looking-up the signed-in user in Windows, and in that case the username needs to be passed. You can also chain with WithExtraQueryParameters(Dictionary<String,String>) to pass additional query parameters to the STS, and one of the overrides of WithAuthority(String, Boolean) in order to override the default authority set at the application construction. Note that the overriding authority needs to be part of the known authorities added to the application construction.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應