table of contents
- trixie-backports 0.10.1-1~bpo13+1
- testing 0.10.1-1
- unstable 0.10.1-1
| SSO-MIB-GCH-SMTP-O365(1) | User Commands | SSO-MIB-GCH-SMTP-O365(1) |
NAME¶
sso-mib-gch-smtp-o365 - git credential helper for Office 365 SMTP using Microsoft Identity Broker
SYNOPSIS¶
sso-mib-gch-smtp-o365 [client_id] [authority] command
DESCRIPTION¶
sso-mib-gch-smtp-o365 is a git credential helper that authenticates git-send-email(1) on Office 365 using OAuth2 tokens obtained from the Microsoft Identity Broker via the sso-mib library.
It acquires an access token for the https://outlook.office365.com/SMTP.Send scope and outputs credentials in the format expected by git-credential(1).
The helper only responds to the get command for the smtp protocol. The approve, reject, and capability commands are silently ignored.
ARGUMENTS¶
- client_id
- Azure client application ID. Can also be set via the environment variable MIB_GCH_SMTP_CLIENT_ID. The command-line argument takes precedence.
- Entra ID (Azure AD) authority URL (e.g. https://login.microsoftonline.com/<tenant_id>). Can also be set via the environment variable MIB_GCH_SMTP_AUTHORITY. The command-line argument takes precedence.
- command
- The git credential helper command. One of get, approve, reject, or capability. Only get produces output.
ENVIRONMENT¶
- MIB_GCH_SMTP_CLIENT_ID
- Azure client application ID. Used when no client_id argument is provided on the command line.
- MIB_GCH_SMTP_AUTHORITY
- Entra ID authority URL. Used when no authority argument is provided on the command line.
- G_MESSAGES_DEBUG=ssomib
- Enable debug logging of DBus call parameters via GLib's message logging system.
GIT CONFIGURATION¶
Add the following to your .gitconfig to use this helper for SMTP credentials:
[credential "smtp://"]
helper = !sso-mib-gch-smtp-o365 <client_id> <authority>
Or, using environment variables:
[credential "smtp://"]
helper = !sso-mib-gch-smtp-o365
OUTPUT¶
On a successful get command for the smtp protocol, the helper outputs:
username=<user@example.com> password=<access_token> password_expiry_utc=<epoch_seconds> authtype=bearer
EXIT STATUS¶
- 0
- Success, or a non-applicable command/protocol was received.
- 1
- An error occurred (e.g., missing authority or client ID, broker communication failure).
EXAMPLES¶
Use with git send-email:
$ git config --global credential.smtp://.helper \
'!sso-mib-gch-smtp-o365 <client_id> https://login.microsoftonline.com/<tenant_id>' $ git send-email --smtp-auth=xoauth2 *.patch
Test the helper manually:
$ echo "protocol=smtp" | sso-mib-gch-smtp-o365 <client_id> <authority> get
SEE ALSO¶
sso-mib-tool(1), git-credential(1), git-send-email(1)
AUTHORS¶
Felix Moessbauer <felix.moessbauer@siemens.com>
Andreas Ziegler <ziegler.andreas@siemens.com>
COPYRIGHT¶
Copyright (C) 2025 Siemens AG. Licensed under MIT.
| 2025 | sso-mib 0.10.1 |