AuthenticationContext.AcquireDeviceCodeAsync Method

Definition

Overloads

AcquireDeviceCodeAsync(String, String)

Acquires device code from the authority.

AcquireDeviceCodeAsync(String, String, String)

Acquires device code from the authority.

AcquireDeviceCodeAsync(String, String)

Acquires device code from the authority.

public System.Threading.Tasks.Task<Microsoft.IdentityModel.Clients.ActiveDirectory.DeviceCodeResult> AcquireDeviceCodeAsync (string resource, string clientId);
member this.AcquireDeviceCodeAsync : string * string -> System.Threading.Tasks.Task<Microsoft.IdentityModel.Clients.ActiveDirectory.DeviceCodeResult>
Public Function AcquireDeviceCodeAsync (resource As String, clientId As String) As Task(Of DeviceCodeResult)

Parameters

resource
System.String

Identifier of the target resource that is the recipient of the requested token.

clientId
System.String

Identifier of the client requesting the token.

Returns

System.Threading.Tasks.Task<DeviceCodeResult>

It contains Device Code, its expiration time, User Code.

Applies to

AcquireDeviceCodeAsync(String, String, String)

Acquires device code from the authority.

public System.Threading.Tasks.Task<Microsoft.IdentityModel.Clients.ActiveDirectory.DeviceCodeResult> AcquireDeviceCodeAsync (string resource, string clientId, string extraQueryParameters);
member this.AcquireDeviceCodeAsync : string * string * string -> System.Threading.Tasks.Task<Microsoft.IdentityModel.Clients.ActiveDirectory.DeviceCodeResult>
Public Function AcquireDeviceCodeAsync (resource As String, clientId As String, extraQueryParameters As String) As Task(Of DeviceCodeResult)

Parameters

resource
System.String

Identifier of the target resource that is the recipient of the requested token.

clientId
System.String

Identifier of the client requesting the token.

extraQueryParameters
System.String

This parameter will be appended as is to the query string in the HTTP authentication request to the authority. The parameter can be null.

Returns

System.Threading.Tasks.Task<DeviceCodeResult>

It contains Device Code, its expiration time, User Code.

Applies to