Udostępnij za pośrednictwem


AcquireTokenInteractiveParameterBuilder.WithAccount(IAccount) Method

Definition

Sets the account for which the token will be retrieved. This method is mutually exclusive with WithLoginHint(String). If both are used, an exception will be thrown

public Microsoft.Identity.Client.AcquireTokenInteractiveParameterBuilder WithAccount (Microsoft.Identity.Client.IAccount account);
member this.WithAccount : Microsoft.Identity.Client.IAccount -> Microsoft.Identity.Client.AcquireTokenInteractiveParameterBuilder
Public Function WithAccount (account As IAccount) As AcquireTokenInteractiveParameterBuilder

Parameters

account
IAccount

Account to use for the interactive token acquisition. See IAccount for ways to get an account

Returns

The builder to chain the .With methods

Remarks

An exception will be thrown If AAD returns a different account than the one that is being requested for.

Applies to