次の方法で共有


PublicClientApplication.AcquireTokenByIntegratedWindowsAuth Method

Definition

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 Microsoft.Identity.Client.AbstractAcquireTokenParameterBuilder`1.WithExtraQueryParameters(System.Collections.Generic.Dictionary{System.String,System.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