Closed NecoInventtis closed 1 month ago
The only thing that immediately stands out is that you've set use_login_password_as_client_credentials_secret = True
but also provided a client_secret
value. This will lead to this option being ignored, and the value you've provided in the configuration file will be used instead of the login password.
Typically when there are problems with a CCG flow setup there is an issue with the Azure / Entra configuration (for example, not granting permission for the required scopes, or missing admin approval, etc). So, just to be clear, when you say the credentials work outside of the proxy, do you mean they work with IMAP/SMTP when you authenticate manually? Or are you referring to other services?
I'm assuming this was resolved, so will close this issue.
Hi,
I'm trying to use email-oauth2-proxy to communicate with O365 using the client credentials flow (CCG), but I'm encountering an authentication failure. Below is a summary of my setup:
Configuration: Here is my emailproxy.config file (anonymized):
Note: The real config file contains the actual values for TENANT_ID, CLIENT_ID, and CLIENT_SECRET. These variables are just placeholders here.
Log Output:
Problem:
After connecting successfully to the O365 IMAP server, the authentication (AUTH XOAUTH2) fails with a NO AUTHENTICATE failed message, despite using correct client_id and client_secret.
I've double-checked my TENANT_ID, CLIENT_ID, and CLIENT_SECRET, and confirmed they are correct using a shell script to fetch the tokens. The same credentials work outside of the proxy when using OAuth2 with other tools.
Could you provide guidance on what might be causing the failure during the authentication process or suggest any additional steps for debugging?
Thanks in advance for your support!
Best regards, Neco