Access-OneDrive-via-Microsoft-Graph-Python icon indicating copy to clipboard operation
Access-OneDrive-via-Microsoft-Graph-Python copied to clipboard

Automatically Obtaining a refresh token once session expires

Open srijuk opened this issue 4 years ago • 2 comments

Hi Pranab Thanks again for the last issue I raised. Is it possible to automatically check and obtain a refresh token once the current session expires. This is really becoming a problem if you have large amount of data to upload. Thanks Srini

srijuk avatar Aug 21 '21 16:08 srijuk

You may use Code flow authentication to get refresh_token for persistent session. Hope it solves your issue.

pranabdas avatar Aug 22 '21 03:08 pranabdas

Hi Pranab Thanks again for this. Appreciate your time. I got an error saying that client secrets are no more accepted. I removed that and it worked fine. I managed to get it to work using code flow authentication. Is it not possible to altogether avoid copy pasting the links to the browser and back. I remember reading somewhere we can emulate the request that its from a browser. Was thinking on those lines. Appreciate your help so far. Regards Srini

srijuk avatar Aug 22 '21 13:08 srijuk