Is there any way to get Microsoft's oauth2 device-flow API to return a verification_uri_complete?

Viewed 142

I am writing a small command-line utility that authenticates to an Azure AD server using Microsoft's implementation of the oauth2 "device flow" process (via a web request) as described here:

https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code

As described in that documentation, the device authorization request returns a user_code (eg, ABC999XYZ) and a verification_uri (which in this case is https://microsoft.com/devicelogin): the user is suppose to go to that URI and enter the supplied user_code. Although this works, it's a pain for the user.

The documentation says that the request will also return verification_uri_complete, which effectively includes the user_code (so that the user doesn't have to copy it into a web form). But, at least when I try it, there is no such return parameter. (And to be fair, the official oauth2 spec says that it's optional. But Microsoft's documentation doesn't say it's optional.)

Is there any way to get a verification_uri_complete?

1 Answers

The documentation is incorrect I'm afraid - we haven't added support for it /yet/ but are considering it in the future. Apologies for the confusion. I'm submitting a fix now for the docs.

Related