9,364 questions
you need to generate a new user code and try again.
Here are the steps you can follow to generate a new access token:
Make sure you have the latest version of the Microsoft Authentication Library (MSAL) installed.
- Update your code to initiate a new device flow and retrieve the updated user code:
app = msal.PublicClientApplication(CLIENT_ID, authority=AUTHORITY)
flow = app.initiate_device_flow(scopes=SCOPES)
if 'user_code' not in flow: