office365_test_connection
Verify Office 365 OAuth2 setup by acquiring a Graph API token. Checks environment variables O365_TENANT_ID, O365_CLIENT_ID, O365_CLIENT_SECRET, and reports misconfigurations. Use to diagnose connection issues before sending emails.
Instructions
Verify OAuth2 configuration by acquiring an app-only Graph token.
Performs no email send and reads no data. It only checks that the O365_TENANT_ID / O365_CLIENT_ID / O365_CLIENT_SECRET environment variables are present and valid enough to obtain an access token from Microsoft Entra ID. Use this first when diagnosing setup problems.
Returns: str: "OK: ..." on success (token acquired), including whether a default O365_SENDER is configured; otherwise a string beginning with "Error: " explaining what is misconfigured.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |