Closed dschwilk closed 2 years ago
Try removing the credentials cache (this will remove your refresh token) and getting a new one.
$ rm ~/.local/share/oauth2ms/credentials.bin
and then execute oauth2ms
again.
Luckily I just moved the credentials.bin out of the way. Something seems to have changed and new credentials do not download. I am getting webpage with "Authorization complete" as reported in #22 and no new credentials.bin ... imap at least working with the old credentials.bin
Thank you @nbarrientos for this. A new refresh token was what was needed. The reason this did not work immediately for me was my own carelessness: in previous testing and experimenting I had put the wrong url for the smtp scope in config.json. For my setup it needed to be
"scopes": ["https://outlook.office365.com/IMAP.AccessAsUser.All","https://outlook.office365.com/SMTP.Send"]
Although the localhost webpage that oath2ms returned stated "Authorization complete.", the url string showed that it had not worked eg:
The+resource+principal+named+https%3a%2f%2fsmtp.office365.com+was+not+found+in+the+tenant+named ...
Thank you for oauth2ms! This helped me continue to use emacs mbsync and mu4e when my university forced oauth2 imap this summer. At that time, smtp did not yet require oauth2 so I did not add code to my mu4e setup to use oauth2. That changed today. Therefore, I added to my .emacs based on the code in steps.org. I also made sure the config.json file had
And I had already set the smtp permissions in azure.
But attempting to send smtp results in an smtp trace like shown below (I deleted the token string). Any suggestion on where to start?