You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flow = app.initiate_device_flow(scopes=scopes)
print(flow["message"])
result = app.acquire_token_by_device_flow(flow)
Method 2. By Code (Maybe change this)
redirect_uri = 'https://login.microsoftonline.com/common/oauth2/nativeclient'
app = msal.ConfidentialClientApplication(conn['client_id'], client_credential=conn['secret'], token_cache=cache)
url = app.get_authorization_request_url(scopes, redirect_uri=redirect_uri)
print('Navigate to the following url in a web browser:')
print(url)
print('After login, you will be redirected to a blank (or error) page with a url containing an access code. Paste the url below.')
resp = input('Response url: ')
i = resp.find('code') + 5
code = resp[i : resp.find('&', i)] if i > 4 else resp
result = app.acquire_token_by_authorization_code(code, scopes, redirect_uri=redirect_uri)
hmkim
changed the title
Suggestion(
Code suggestion for auth
Mar 2, 2022
hmkim
changed the title
Code suggestion for auth
(Suggestion) Code snippet for auth
Mar 2, 2022
No description provided.
The text was updated successfully, but these errors were encountered: