Skip to content

Instantly share code, notes, and snippets.

@lmazuel
Created July 1, 2017 00:17
Show Gist options
  • Save lmazuel/b920fe953ea19af048728c1634e07a40 to your computer and use it in GitHub Desktop.
Save lmazuel/b920fe953ea19af048728c1634e07a40 to your computer and use it in GitHub Desktop.
device code SDK
context = adal.AuthenticationContext(authority_url, api_version=None)
code = context.acquire_user_code(RESOURCE, clientid)
print(code['message'])
credentials = AdalAuthentication(
context.acquire_token_with_device_code,
resource,
code,
clientid
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment