sasl-xoauth2-tool - Man Page


sasl-xoauth2-tool [-h] {get-token,test-config,test-token-refresh} ...

Positional Arguments

COMMAND 'sasl-xoauth2-tool get-token'

usage: sasl-xoauth2-tool get-token [-h] --client-id CLIENT_ID
                                  [--tenant TENANT]
                                  [--client-secret CLIENT_SECRET]
                                  [--scope SCOPE] [--use-device-flow]
                                  {outlook,gmail} [output_file]

Fetches initial access and refresh tokens from an OAuth 2 provider


service type


output file, '-' for stdout

OPTIONS 'sasl-xoauth2-tool get-token'

--client-id CLIENT_ID

required for both services

--tenant TENANT

wanted by 'outlook' (defaults to 'consumers')

--client-secret CLIENT_SECRET

required for both services, will prompt the user if blank

--scope SCOPE

required for 'gmail'


use simplified device flow for Outlook/Azure

COMMAND 'sasl-xoauth2-tool test-config'

usage: sasl-xoauth2-tool test-config [-h] [--config-file CONFIG_FILE]

Tests a sasl-xoauth2 config file for syntax errors

OPTIONS 'sasl-xoauth2-tool test-config'

--config-file CONFIG_FILE

config file path (defaults to '/etc/sasl-xoauth2.conf')

COMMAND 'sasl-xoauth2-tool test-token-refresh'

usage: sasl-xoauth2-tool test-token-refresh [-h] [--config-file CONFIG_FILE]

Tests that a token can be refreshed (i.e., that the OAuth 2 flow is working correctly)


file containing initial access token

OPTIONS 'sasl-xoauth2-tool test-token-refresh'

--config-file CONFIG_FILE

config file path (defaults to '/etc/sasl-xoauth2.conf')


Tarick Bedeir


The latest version of sasl-xoauth2 may be downloaded from

Referenced By


2023-08-07 sasl-xoauth2 Generated Python Manual