Usage
m365 cli app add [options]
Description
Create a new app registration to use for the CLI for Microsoft 365
Options
| Option |
Description |
-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 to minimal. |
--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. |
Examples
Create a new app registration to use for CLI for Microsoft 365
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"
Default properties
No response
Additional Info
No response
Usage
m365 cli app add [options]
Description
Create a new app registration to use for the CLI for Microsoft 365
Options
-n, --name [name]CLI for M365-s, --scopes [scopes]minimal,all, or a list of scopes. Defaults tominimal.--saveToConfigExamples
Create a new app registration to use for CLI for Microsoft 365
Create a new app registration with all permission scopes and a custom name
m365 cli app add --name "Contoso CLI app" --scopes allCreate 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"Default properties
No response
Additional Info
No response