python-o365
python-o365 copied to clipboard
Can't paste response from M365 after auth step
When I call
account.authenticate(scopes=['basic', 'mailbox', 'calendar', 'onedrive', 'sharepoint']):
The response from M365 won't paste into the console - the console beeps.
It works if I run it interactively, but not in a django app. Any clues appreciated. Thanks.
The URL looks fine BTW. When I run the command (account.authenticate) in a shell, it pastes OK. But in a script with other stuff, it won't accept it?
It must. Check the readme. There's an example on how to do authentication on the web.
You are most likely running into the issue described here: https://stackoverflow.com/questions/54409232/how-to-input-value-longer-than-4095-characters
The Microsoft URL that is returned is greater than 4095 characters which causes the console to reject any characters past the limit when pasting it. Using the solution in the stackoverflow thread above solves the issue.