Skip to content

boolean_smtp_microsoft_token_url

Filters the Microsoft identity platform token endpoint used to exchange or refresh delegated and application tokens.

filter Tier B Since 1.0.0

Return a different URL to override the resolved endpoint, for example for a sovereign cloud. Fired wherever the plugin or the Pro add-on talks to the token endpoint: the manual and scheduled refreshes, the Graph sender, the credential check and the application-permission mailer.

Signature

add_filter( 'boolean_smtp_microsoft_token_url', $callback, 10, 2 );

Parameters

ParameterTypeDescription
$urlstringToken endpoint URL built from the tenant: `https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token`.
$tenantstringMicrosoft tenant id or domain, or `common`, `organizations`, `consumers`.

Returns string — The filtered URL.

Fires in

Example

boolean_smtp_microsoft_token_url.php
add_filter( 'boolean_smtp_microsoft_token_url', function ( string $url, string $tenant ) {
return $url;
}, 10, 2 );

Next steps