SMTP with Modern Auth

Hi Jenkins Community,

I’m trying to configure SMTP in Jenkins using Modern Authentication (OAuth 2.0) and would appreciate any guidance from those who may have successfully implemented this setup.

Current Jenkins setup:

  • Version: 2.522

  • Installed Plugins:

    • Mailer: 515.vd788654779b_1

    • Email Extension: 1925.v1598902b_58dd

    • Plain Credentials: 199.v9f8e1f741799

    • OAuth Credentials: 0.657.v7d8dd90b_0382

    • Azure Credentials: 357.v6447d38fb_007

I noticed the OAuth Credentials plugin is available and installed, but I couldn’t find any clear documentation or examples on how to connect it with SMTP (e.g., Office 365 SMTP with OAuth2).

Has anyone successfully configured Jenkins email notifications via SMTP using OAuth 2.0?
If so:

  • What credential type should be used under Manage Jenkins → Credentials?

  • Is there a way to link OAuth credentials with the Email Extension or Mailer plugin settings?

  • Any specific client/application registration configuration that must be done (e.g., in Azure AD)?

Any leads, documentation, or tips will be greatly appreciated.

Thanks in advance!

1 Like