If you're still interesting in this question, so you can add further code to duplicity/backends/onedrivebackend.py right after self.http_client = OAuth2Session(...) (for 0.7.06 it should starts on line 125) :
# We have to refresh token manually because it's not working "under the covers"
if token is not None: self.http_client.refresh_token(self.OAUTH_TOKEN_URI)
There are some problems with requests-oauthlib. It doesn't refresh token... it needs more deeper analysis. But we can just refresh it manually at this moment.
If you're still interesting in this question, so you can add further code to duplicity/ backends/ onedrivebackend .py right after self.http_client = OAuth2Session(...) (for 0.7.06 it should starts on line 125) :
# We have to refresh token manually because it's not working "under the covers"
self. http_client. refresh_ token(self. OAUTH_TOKEN_ URI)
if token is not None:
There are some problems with requests-oauthlib. It doesn't refresh token... it needs more deeper analysis. But we can just refresh it manually at this moment.
duplicity-team, maybe it worth to be commited ?