Dela via


AcquireTokenByIntegratedWindowsAuthParameterBuilder.WithUsername Method

Definition

Specifies the username.

public Microsoft.Identity.Client.AcquireTokenByIntegratedWindowsAuthParameterBuilder WithUsername (string username);
member this.WithUsername : string -> Microsoft.Identity.Client.AcquireTokenByIntegratedWindowsAuthParameterBuilder
Public Function WithUsername (username As String) As AcquireTokenByIntegratedWindowsAuthParameterBuilder

Parameters

username
String

Identifier of the user account for which to acquire a token with Integrated Windows Authentication. Generally in UserPrincipalName (UPN) format, e.g. john.doe@contoso.com

Returns

The builder to chain the .With methods.

Remarks

Specifying the username explicitly is normally not needed, but some Windows administrators set policies preventing applications from looking up the signed-in user and in that case the username needs to be passed.

Applies to