You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/docs/_clisettings.mdx
+6
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,11 @@ Setting name|Definition|Default value
2
2
------------|----------|-------------
3
3
`authType`|Default login method to use when running `m365 login` without the `--authType` option.|`deviceCode`
4
4
`autoOpenLinksInBrowser`|Automatically open the browser for all commands which return a url and expect the user to copy paste this to the browser. For example when logging in, using `m365 login` in device code mode.|`false`
5
+
`clientId`|ID of the default Entra ID app use by the CLI to authenticate|``
6
+
`clientSecret`|Secret of the default Entra ID app use by the CLI to authenticate|``
7
+
`clientCertificateFile`|Path to the file containing the client certificate to use for authentication|``
`clientCertificatePassword`|Password to the client certificate file|``
5
10
`copyDeviceCodeToClipboard`|Automatically copy the device code to the clipboard when running `m365 login` command in device code mode|`false`
6
11
`csvEscape`|Single character used for escaping; only apply to characters matching the quote and the escape options|`"`
7
12
`csvHeader`|Display the column names on the first line|`true`
@@ -18,3 +23,4 @@ Setting name|Definition|Default value
18
23
`promptListPageSize`|By default, lists of choices longer than 7 will be paginated. Use this option to control how many choices will appear on the screen at once.|7
19
24
`showHelpOnFailure`|Automatically display help when executing a command failed|`true`
20
25
`showSpinner`|Display spinner when executing commands|`true`
26
+
`tenantId`|ID of the default tenant to use when authenticating with|``
Copy file name to clipboardexpand all lines: docs/docs/cmd/setup.mdx
+16-3
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,9 @@ m365 setup [options]
18
18
19
19
`--scripting`
20
20
: Configure CLI for Microsoft 365 for use in scripts without prompting for additional information.
21
+
22
+
`--skipApp`
23
+
: Skip configuring an Entra app for use with CLI for Microsoft 365.
21
24
```
22
25
23
26
<Global />
@@ -28,6 +31,10 @@ The `m365 setup` command is a wizard that helps you configure the CLI for Micros
28
31
29
32
The command will ask you the following questions:
30
33
34
+
-_CLI for Microsoft 365 requires a Microsoft Entra app. Do you want to create a new app registration or use an existing one?_
35
+
36
+
You can choose between using an existing Entra app or creating a new one. If you choose to create a new app, the CLI will ask you to choose between a minimal and a full set of permissions. It then signs in as Azure CLI to your tenant, creates a new app registration, and stores its information in the CLI configuration.
37
+
31
38
-_How do you plan to use the CLI?_
32
39
33
40
You can choose between **interactive** and **scripting** use. In interactive mode, the CLI for Microsoft 365 will prompt you for additional information when needed, automatically open links browser, automatically show help on errors and show spinners. In **scripting** mode, the CLI will not use interactivity to prevent blocking your scripts.
@@ -71,24 +78,30 @@ The `m365 setup` command uses the following presets:
71
78
72
79
## Examples
73
80
74
-
Configure CLI for Microsoft based on your preferences interactively
81
+
Configure CLI for Microsoft 365 based on your preferences interactively
75
82
76
83
```sh
77
84
m365 setup
78
85
```
79
86
80
-
Configure CLI for Microsoft for interactive use without prompting for additional information
87
+
Configure CLI for Microsoft 365 for interactive use without prompting for additional information
81
88
82
89
```sh
83
90
m365 setup --interactive
84
91
```
85
92
86
-
Configure CLI for Microsoft for use in scripts without prompting for additional information
93
+
Configure CLI for Microsoft 365 for use in scripts without prompting for additional information
87
94
88
95
```sh
89
96
m365 setup --scripting
90
97
```
91
98
99
+
Configure CLI for Microsoft 365 without setting up an Entra app
Copy file name to clipboardexpand all lines: docs/docs/index.mdx
+7-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,13 @@ yarn global add @pnp/cli-microsoft365
27
27
28
28
## Getting started
29
29
30
-
Start managing the settings of your Microsoft 365 tenant by logging in to it, using the `login` command, for example:
30
+
Start, by configuring CLI for Microsoft 365 to your preferences. Configuration includes specifying an Entra app registration that the CLI should use. You can choose between using an existing app registration or creating a new one. To configure the CLI, run the [setup](./cmd/setup) command:
31
+
32
+
```sh
33
+
m365 setup
34
+
```
35
+
36
+
After configuring the CLI, you can start using it. Start managing the settings of your Microsoft 365 tenant by logging in to it, using the [login](./cmd/login) command, for example:
0 commit comments