Skip to content

Instantly share code, notes, and snippets.

@MauRiEEZZZ
Created November 1, 2019 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MauRiEEZZZ/14b69d7488a4622ff98d5dfb68f64b4c to your computer and use it in GitHub Desktop.
Save MauRiEEZZZ/14b69d7488a4622ff98d5dfb68f64b4c to your computer and use it in GitHub Desktop.
context = adal.AuthenticationContext(authority_host_uri, api_version=None)
code = context.acquire_user_code(keyvault_resource_uri, client_id)
print(code['message'])
kv_token = context.acquire_token_with_device_code(keyvault_resource_uri, code, client_id)
kv_credential = AADTokenCredentials(kv_token, client_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment