Open BiLLy-85 opened 8 months ago
Hey @BiLLy-85, I believe you're using wrong URL for authorization.
You should try using https://login.microsoftonline.com/{Tenant-id}/oauth2/v2.0/authorize
instead of /token
. When using this endpoint, you will receive the code which is then used with /token
endpoint as authentication method to fetch tokens.
Here's the official docs :
@BiLLy-85 Did you get this working with Paperless? I am currently trying to set up the same integration.
I can't seem to go any further, tried everything.
I try to let Microsoft 365 work on paperless, I've got paperless on a docker on my Synology with docker compose. Put email-auth2-proxy-docker with the docker compose and I've got something to work, if i try to connect paperless i get some logs, with one with an link, but if i try to open that link on my computer it'll give an error:
AADSTS900561: The endpoint only accepts POST, OPTIONS requests. Received a GET request.
My docker compose looks like this:
The emailroxy.config looks like this:
The log says the following:
So now, if i go to the link profided in the log-file: https://login.microsoftonline.com//oauth2/v2.0/token?client_id=client-id&redirect_uri=http%3A%2F%2Flocalhost&scope=https%3A%2F%2Foutlook.office365.com%2F.default&response_type=code&access_type=offline&login_hint=mailbox%40domain.nl`
I will get the following message:
So, obviously I don't know how to fix this error, where to put an post instead of an get (..?)
And after this, i understood i have to put the given URL somewhere else, but where should that be exactly? I don't know for sure if this is related to the docker repository or if i should ask this question in the original repository.