-
-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hi,
I'd like to use this project to authenticate as an application to a Microsoft365 tenant, but it seems that's not supported?
There is client_id
, client_secret
and token_endpoint
(https://login.microsoftonline.com/<TENANT>/oauth2/v2.0/token
) provided in /etc/sasl-xoauth2.conf
. When attempting to send mail, postfix logs:
sasl-xoauth2: auth failed: 2023-10-11 00:26:59: TokenStore::Read: failed to open file
/etc/tokens/<SENDER>
: No such file or directory
So I used Postman on the credentials to retrieve a token, and pasted that into the SENDER
token file. That takes me one step further:
sasl-xoauth2: auth failed: 2023-10-11 00:18:22: TokenStore::Read: missing refresh_token
And indeed, there's only token_type
, expires_in
, ext_expires_in
and access_token
present in the token file. However, the client credentials flow should directly use the access_token
as long as it is valid... ?
The credentials belong to an "app registration" and already has all necessary rights and consents, hence I don't want to go through any additional consent dialog (as the --use-device-flow
flow would suggest).
Did I miss something? Thank you very much!