office365: oauth2 authentication for python etl integration

 

 

office365 just disabled Simple Authentication (simple username and password authentication). We used this on a regular python script and its not working anymore, so we now have to do a completely new process to get access to our shared email.

 

  • login to azure active directory as admin
  • create an app
  • create the password
  • add the following api permissions.

 

  • run the python script

 

 

 

 

references

  • https://stackoverflow.com/questions/71739356/office-365-handle-the-deactivation-of-imap-basic-auth-with-noninteractive-serv
  • https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth
  • https://www.codewrecks.com/post/security/accessing-office-365-imap-with-oauth2/
  • https://learn.microsoft.com/en-us/graph/use-postman

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *