Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue connecting to IMAP #55

Open
Black-Dragon-Spirit opened this issue Aug 22, 2023 · 1 comment
Open

Issue connecting to IMAP #55

Black-Dragon-Spirit opened this issue Aug 22, 2023 · 1 comment

Comments

@Black-Dragon-Spirit
Copy link

When using an application token (without user) it's not possible to connect (authenticate) to the server.
Tried dividend scopes for the token:
https://graph.microsoft.com/.default
https://outlook.office.com/.default
https://outlook.office365.com/.default

All the permissions are set.

@tiamatloc
Copy link

@Black-Dragon-Spirit When using an application token you are authenticating to Azure, NOT the mailbox (or you could read any of them in a corporate 365 environment). The error is correct, but a bit misleading. You have to use the Enterprise application and use a service principle to authorise delegate access to the mailbox(es) as if you would granting Bob access to Alice's mailbox when Alice goes on vacation. https://outlook.office365.com/.default is the correct scope to use.

https://vielhuber.de/en/blog/access-with-php-to-exchange-office-365/
https://www.limilabs.com/blog/oauth2-client-credential-flow-office365-exchange-imap-pop3-smtp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants