Skip to content

cli config set

Sets CLI for Microsoft 365 configuration options


m365 cli config set [options]


-k, --key <key>
Config key to specify
-v, --value <value>
Config value to set
-h, --help
output usage information
--query [query]
JMESPath query string. See for more information and examples
-o, --output [output]
Output type. json,text,csv. Default json
Runs command with verbose logging
Runs command with debug logging

Available settings

Following is the list of configuration settings available in CLI for Microsoft 365.

Setting name Definition Default value
errorOutput Defines if errors should be written to stdout or stderr stderr
output Defines the default output when issuing a command json
printErrorsAsPlainText When output mode is set to json, print error messages as plain-text rather than JSON true
showHelpOnFailure Automatically display help when executing a command failed true
csvHeader Display the column names on the first line true
csvEscape Single character used for escaping; only apply to characters matching the quote and the escape options "
csvQuote The quote characters surrounding a field. An empty quote value will preserve the original field, whether it contains quotation marks or not.
csvQuoted Quote all the non-empty fields even if not required false
csvQuotedEmpty Quote empty strings and overrides quoted_string on empty strings when defined false


Configure CLI to automatically display help when executing a command failed

m365 cli config set --key showHelpOnFailure --value true

Configure the default CLI output to JSON

m365 cli config set --key output --value json

More information