Skip to content

New command: cli config set #1945

@garrytrinder

Description

@garrytrinder

Usage

m365 cli config set [options]

Description

Update specific CLI setting with a new value

Options

Option Description
-k, --key <key> The setting to be updated
-v, --value <value> The new value

Additional Information

We currently don't provide a way to easily update CLI settings, for example, if a someone wants to use their own identity, we ask them to update two environment variables CLIMICROSOFT365_AADAPPID and CLIMICROSOFT365_TENANT, however it maybe beneficial to provide a command that makes this easier for users to set these settings to their own preference using the CLI and persisting these settings to disk, in a file stored in the users root directory e.g .cli-microsoft365, for convenience.

This command would also provide a future extensibility as we grow personalisation options.

m365 cli config set --key aadappid --value 506af689-32aa-46c8-afb5-972ebf9d218a
m365 cli config set --key tenantid --value e8954f17-a373-4b61-b54d-45c038fe3188

GitHub CLI implements a similar command, gh config set <key> <value>, for updating default settings to user preferences. Source: https://cli.github.com/manual/gh_config_set

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions