cli app add
Create a new app registration to use for the CLI for Microsoft 365
Usage
m365 cli app add [options]
Options
-n, --name [name]
Name of the app registration. Defaults to CLI for M365
-s, --scopes [scopes]
Which scopes should be added? Valid values are:
minimal
,all
, or a list of scopes. Defaults tominimal
.--saveToConfig
Save the app registration info to the CLI config. This way the new app registration will be used as the default app registration to sign in.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,permissions
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Examples
Create a new app registration to use for CLI for Microsoft 365
m365 cli app add
Create a new app registration with all permission scopes and a custom name
m365 cli app add --name "Contoso CLI app" --scopes all
Create a new app registration with self-defined scopes
m365 cli app add --scopes "https://graph.microsoft.com/User.Read,https://graph.microsoft.com/Group.Read.All"
Response
The command won't return a response on success