python-o365 icon indicating copy to clipboard operation
python-o365 copied to clipboard

Can't paste response from M365 after auth step

Open sidprobstein opened this issue 2 years ago • 3 comments

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.

sidprobstein avatar Feb 11 '23 04:02 sidprobstein

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?

sidprobstein avatar Feb 11 '23 04:02 sidprobstein

It must. Check the readme. There's an example on how to do authentication on the web.

alejcas avatar Feb 20 '23 08:02 alejcas

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.

gauravpathak-infa avatar Jul 07 '23 18:07 gauravpathak-infa