-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Token refresh failing for office365 #89
Comments
My own setup is based on Gmail so I don't get to test integration with 365 very often, but I did set up a test account just now and everything still seems to be working fine in the token refresh flow. Can you elaborate a little on what your setup looks like? You generated the initial token with |
Hi, OS: ubuntu 24.04 Postfix configurations: smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination relayhost = [smtp.office365.com]:587 sasl_passwd: sasl-xoauth2.conf (actual client ID replaced with x's): Permissions on tokens directory: When I initially create the token, I get an error if I do not specify a --tenent value (I've replaced the actual client ID with x's): When I place my --tenant id value, I am able to generate the token but for some reason when I try to send an email, or run sasl-xoauth2-tool test-token-refresh, I get the following error message. This occurs even if ran a few seconds after generating the initial token:
|
Thanks for the detailed logs and context! I suspect, but I'm not 100% sure, that if you're having to specify
|
When I change the endpoint to use the tenant ID, I am able to generate an initial token like before, but I am get the following error when I attempt to send out a message:
seems it wants another interactive authorization even after we use the --device-flow option to create the initial token |
Does the email address you have specified in |
I am using my outlook.com email address for this. It is the same one in my sasl_passwd entry. Is there anything I need to do to link my outlook.com account with my azure cloud account? |
You may need to update the supported account types for your "Postfix OAuth" app registration to include consumer accounts: At that point you may need to change your |
Oh awesome -- very glad to hear that worked! |
Hi,
this worked a treat for me for integration with gmail, but I am running into issues with the office365 setup. I followed the instructions, created an app and I was able to generate the token, but the refresh seems to fail:
I have made sure 'Allow public client flows' is enabled. I did however perform the browser authentication part from another machine since the smtp server is headless. I know it needed to be from the same machine for gmail but was not sure if that is the case for office 365 as well.
The text was updated successfully, but these errors were encountered: