AuthenticationContext.AcquireTokenByDeviceCodeAsync(DeviceCodeResult) 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.
Acquires security token from the authority using an device code previously received. This method does not lookup token cache, but stores the result in it, so it can be looked up using other methods such as AcquireTokenSilentAsync(String, String, UserIdentifier).
public System.Threading.Tasks.Task<Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResult> AcquireTokenByDeviceCodeAsync (Microsoft.IdentityModel.Clients.ActiveDirectory.DeviceCodeResult deviceCodeResult);
member this.AcquireTokenByDeviceCodeAsync : Microsoft.IdentityModel.Clients.ActiveDirectory.DeviceCodeResult -> System.Threading.Tasks.Task<Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationResult>
Parameters
- deviceCodeResult
- DeviceCodeResult
The device code result received from calling AcquireDeviceCodeAsync.
Returns
- System.Threading.Tasks.Task<AuthenticationResult>
It contains Access Token, its expiration time, user information.