I have a basic Python Docker container that uses the O365 library to retrieve mail from Office365.
FROM python:3 ADD requirements.txt ./ RUN pip install -r requirements.txt ADD ./main ./main CMD [ "python", "./main/main.py"]
The first time you run this O365 library, you need to authorize it and it stores a
o365_token.txt which it uses after that. That looks like this:
Visit the following url to give consent: https://login.microsoftonline.com/common/oauth2/v2.0/authorize?resp.... Paste the authenticated url here:
This also happened on my new Docker so I logged in to it through Bash:
docker run -it hvdveer/e2t-python bash
But now when I manually run it, it just utilizes the existing token and it works without verification. Deleting the token files and authorizing it again also doesn't work. Why does it ask for authorization when I run it automatically, but not when run it manually? Are these different users? How to I fix this?