@pnp/cli-microsoft365 10.5.0-beta.395d550 → 10.5.0-beta.63404d1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/README.md +1 -1
  3. package/allCommands.json +1 -1
  4. package/allCommandsFull.json +1 -1
  5. package/dist/Auth.js +61 -3
  6. package/dist/appInsights.js +10 -4
  7. package/dist/m365/commands/login.js +3 -0
  8. package/dist/m365/graph/commands/directoryextension/directoryextension-add.js +85 -0
  9. package/dist/m365/graph/commands/directoryextension/directoryextension-get.js +82 -0
  10. package/dist/m365/graph/commands/directoryextension/directoryextension-remove.js +93 -0
  11. package/dist/m365/graph/commands.js +3 -0
  12. package/dist/m365/spo/commands/homesite/homesite-add.js +66 -0
  13. package/dist/m365/spo/commands/page/page-header-set.js +47 -10
  14. package/dist/m365/spo/commands/page/page-section-remove.js +81 -0
  15. package/dist/m365/spo/commands.js +2 -0
  16. package/dist/m365/viva/commands/engage/engage-community-user-add.js +113 -0
  17. package/dist/m365/viva/commands/engage/engage-community-user-remove.js +107 -0
  18. package/dist/m365/viva/commands.js +2 -0
  19. package/dist/request.js +5 -0
  20. package/dist/utils/directoryExtension.js +25 -0
  21. package/dist/utils/entraApp.js +28 -0
  22. package/docs/docs/cmd/graph/directoryextension/directoryextension-add.mdx +123 -0
  23. package/docs/docs/cmd/graph/directoryextension/directoryextension-get.mdx +118 -0
  24. package/docs/docs/cmd/graph/directoryextension/directoryextension-remove.mdx +57 -0
  25. package/docs/docs/cmd/login.mdx +9 -1
  26. package/docs/docs/cmd/spo/homesite/homesite-add.mdx +124 -0
  27. package/docs/docs/cmd/spo/page/page-section-remove.mdx +47 -0
  28. package/docs/docs/cmd/viva/engage/engage-community-user-add.mdx +67 -0
  29. package/docs/docs/cmd/viva/engage/engage-community-user-remove.mdx +55 -0
  30. package/npm-shrinkwrap.json +97 -84
  31. package/package.json +14 -14
@@ -0,0 +1,57 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+
3
+ # graph directoryextension remove
4
+
5
+ Removes a directory extension
6
+
7
+ ## Usage
8
+
9
+ ```sh
10
+ m365 graph directoryextension remove [options]
11
+ ```
12
+
13
+ ## Options
14
+
15
+ ```md definition-list
16
+ `-i, --id [id]`
17
+ : The ID of the directory extension to remove. Specify either `id` or `name`, but not both.
18
+
19
+ `-n, --name [name]`
20
+ : The name of the directory extension to remove. Specify either `id` or `name`, but not both.
21
+
22
+ `--appId [appId]`
23
+ : Application (client) ID of the Entra application where the directory extension is registered. Specify either `appId`, `appObjectId` or `appName`, but not multiple.
24
+
25
+ `--appObjectId [appObjectId]`
26
+ : Object ID of the Entra application where the directory extension is registered. Specify either `appId`, `appObjectId` or `appName`, but not multiple.
27
+
28
+ `--appName [appName]`
29
+ : The name of Entra application where the directory extension is registered. Specify either `appId`, `appObjectId` or `appName`, but not multiple.
30
+
31
+ `-f, --force`
32
+ : Don't prompt for confirmation before removing the directory extension
33
+ ```
34
+
35
+ <Global />
36
+
37
+ ## Examples
38
+
39
+ Remove a directory extension specified by name from an application specified by app object id and don't prompt for confirmation
40
+
41
+ ```sh
42
+ m365 graph directoryextension remove --name extension_105be60b603845fea385e58772d9d630_githubworkaccount --appObjectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --force
43
+ ```
44
+
45
+ Remove a directory extension specified by id from an application specified by app name and don't prompt for confirmation
46
+
47
+ ```sh
48
+ m365 graph directoryextension remove --id 522817ae-5c95-4243-96c1-f85231fcbc1f --appName ContosoApp
49
+ ```
50
+
51
+ ## Response
52
+
53
+ The command won't return a response on success.
54
+
55
+ ## More information
56
+
57
+ - Directory extensions: https://learn.microsoft.com/graph/extensibility-overview#directory-microsoft-entra-id-extensions
@@ -22,7 +22,7 @@ m365 login [options]
22
22
  : ID of the tenant from which accounts should authenticate. Use `common` or `organization` for multitenant apps. Defaults to `common` if not specified and if the config value `tenantId` and the environment variable `CLIMICROSOFT365_TENANT` are also not set.
23
23
 
24
24
  `-t, --authType [authType]`
25
- : The type of authentication to use. Allowed values `certificate`, `deviceCode`, `password`, `identity`, `browser`, `secret`. Default `deviceCode`
25
+ : The type of authentication to use. Allowed values `certificate`, `deviceCode`, `password`, `identity`, `federatedIdentity`, `browser`, `secret`. Default `deviceCode`
26
26
 
27
27
  `-u, --userName [userName]`
28
28
  : Name of the user to authenticate. Required when `authType` is set to `password`
@@ -78,6 +78,8 @@ When logging in to Microsoft 365 using the user name and password, next to the a
78
78
 
79
79
  When logging in to Microsoft 365 using a certificate, the CLI for Microsoft 365 will store the contents of the certificate so that it can automatically re-authenticate if necessary. The contents of the certificate are removed by re-authenticating using the device code or by calling the [logout](logout.mdx) command.
80
80
 
81
+ Federated Identity is currently supported in GitHub Actions. To use this you need to set `authType` to `federatedIdentity` and specify `appId` and `tenant` to the values of the app registration you've configured a federated credential on.
82
+
81
83
  To log in to Microsoft 365 using a certificate or secret, you will typically [create a custom Microsoft Entra application](../user-guide/using-own-identity.mdx). To use this application with the CLI for Microsoft 365, you will set the `CLIMICROSOFT365_ENTRAAPPID` environment variable to the application's ID and the `CLIMICROSOFT365_TENANT` environment variable to the ID of the Microsoft Entra tenant, where you created the Microsoft Entra application. Also, please make sure to read about [the caveats when using the certificate login option](../user-guide/cli-certificate-caveats.mdx).
82
84
 
83
85
  Managed identity in Azure Cloud Shell is the identity of the user. It is neither system- nor user-assigned and it can't be configured. To log in to Microsoft 365 using managed identity in Azure Cloud Shell, set `authType` to `identity` and don't specify the `userName` option.
@@ -182,6 +184,12 @@ Log in to Microsoft 365 using a user-assigned managed identity with `clientId` s
182
184
  m365 login --authType identity --userName ac9fbed5-804c-4362-a369-21a4ec51109e
183
185
  ```
184
186
 
187
+ Log in to Microsoft 365 using a federated identity. Can currently only be used in GitHub Actions.
188
+
189
+ ```sh
190
+ m365 login --authType federatedIdentity --appId eb96cfd0-abfa-4477-8d1d-c6dfde3efb19 --tenant 9a1a1bbd-e158-4cf5-967d-a53b8e85c628
191
+ ```
192
+
185
193
  Log in to Microsoft 365 using the interactive browser authentication with `clientId` set in the configuration. Uses the identity of the current user.
186
194
 
187
195
  ```sh
@@ -0,0 +1,124 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # spo homesite add
6
+
7
+ Adds a home site
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 spo homesite add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-u, --url <url>`
19
+ : URL of the site to use as a home site.
20
+
21
+ `--isInDraftMode [isInDraftMode]`
22
+ : Specifies whether the home site is in draft mode. Accepts `true` or `false`. Default is `false`.
23
+
24
+ `--vivaConnectionsDefaultStart [vivaConnectionsDefaultStart]`
25
+ : Specifies whether the home site is the default start for Viva Connections. Accepts `true` or `false`. Default is `true`.
26
+
27
+ `--audiences [audiences]`
28
+ : Comma-separated list of Microsoft Entra group IDs that will be used as audience.
29
+
30
+ `--order [order]`
31
+ : Order of the home site. Must be a positive integer.
32
+ ```
33
+
34
+ <Global />
35
+
36
+ ## Examples
37
+
38
+ Add a home site
39
+
40
+ ```sh
41
+ m365 spo homesite add --url "https://contoso.sharepoint.com/sites/testcomms"
42
+ ```
43
+
44
+ Add a home site with additional options
45
+
46
+ ```sh
47
+ m365 spo homesite add --url "https://contoso.sharepoint.com/sites/testcomms" --isInDraftMode true --vivaConnectionsDefaultStart false --audiences "af8c0bc8-7b1b-44b4-b087-ffcc8df70d16,754ff15c-76b1-44cb-88c7-0065a4d3cfb7" --order 2
48
+ ```
49
+
50
+ ## Response
51
+
52
+ <Tabs>
53
+ <TabItem value="JSON">
54
+
55
+ ```json
56
+ {
57
+ "Audiences": [
58
+ {
59
+ "Email": "active@contoso.onmicrosoft.com",
60
+ "Id": "7a1eea7f-9ab0-40ff-8f2e-0083d9d63451",
61
+ "Title": "active Members"
62
+ }
63
+ ],
64
+ "IsInDraftMode": true,
65
+ "IsVivaBackendSite": false,
66
+ "SiteId": "ca49054c-85f3-41eb-a290-46ffda8f219c",
67
+ "TargetedLicenseType": 0,
68
+ "Title": "testcommsite",
69
+ "Url": "https://contoso.sharepoint.com/sites/testcomms",
70
+ "VivaConnectionsDefaultStart": false,
71
+ "WebId": "256c4f0f-e372-47b4-a891-b4888e829e20"
72
+ }
73
+ ```
74
+
75
+ </TabItem>
76
+ <TabItem value="Text">
77
+
78
+ ```text
79
+ Audiences : [{"Email":"active@contoso.onmicrosoft.com","Id":"7a1eea7f-9ab0-40ff-8f2e-0083d9d63451","Title":"active Members"}]
80
+ IsInDraftMode : true
81
+ IsVivaBackendSite : false
82
+ SiteId : ca49054c-85f3-41eb-a290-46ffda8f219c
83
+ TargetedLicenseType : 0
84
+ Title : testcommsite
85
+ Url : https://contoso.sharepoint.com/sites/testcomms
86
+ VivaConnectionsDefaultStart: false
87
+ WebId : 256c4f0f-e372-47b4-a891-b4888e829e20
88
+ ```
89
+
90
+ </TabItem>
91
+ <TabItem value="CSV">
92
+
93
+ ```csv
94
+ IsInDraftMode,IsVivaBackendSite,SiteId,TargetedLicenseType,Title,Url,VivaConnectionsDefaultStart,WebId
95
+ 1,0,ca49054c-85f3-41eb-a290-46ffda8f219c,0,testcommsite,https://contoso.sharepoint.com/sites/testcomms,0,256c4f0f-e372-47b4-a891-b4888e829e20
96
+ ```
97
+
98
+ </TabItem>
99
+ <TabItem value="Markdown">
100
+
101
+ ```md
102
+ # spo homesite add --url "https://contoso.sharepoint.com/sites/testcomms"
103
+
104
+ Date: 12/23/2024
105
+
106
+ ## testcommsite (https://contoso.sharepoint.com/sites/testcomms)
107
+
108
+ Property | Value
109
+ ---------|-------
110
+ IsInDraftMode | true
111
+ IsVivaBackendSite | false
112
+ SiteId | ca49054c-85f3-41eb-a290-46ffda8f219c
113
+ TargetedLicenseType | 0
114
+ Title | testcommsite
115
+ Url | https://contoso.sharepoint.com/sites/testcomms
116
+ VivaConnectionsDefaultStart | false
117
+ WebId | 256c4f0f-e372-47b4-a891-b4888e829e20
118
+ ```
119
+ </TabItem>
120
+ </Tabs>
121
+
122
+ ## More information
123
+
124
+ - SharePoint home sites [Viva Connections set up](https://learn.microsoft.com/en-us/viva/connections/set-up-admin-center)
@@ -0,0 +1,47 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # spo page section remove
6
+
7
+ Removes the specified section from a modern page
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 spo page section remove [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-u, --webUrl <webUrl>`
19
+ : URL of the site where the page is located.
20
+
21
+ `-n, --pageName <pageName>`
22
+ : Name of the page from which to remove a section.
23
+
24
+ `-s, --section <section>`
25
+ : ID of the section to be removed.
26
+
27
+ `-f, --force`
28
+ : Don't prompt for confirmation.
29
+ ```
30
+
31
+ <Global />
32
+
33
+ ## Remarks
34
+
35
+ If the specified `pageName` doesn't refer to an existing modern page, you will get a _File doesn't exists_ error.
36
+
37
+ ## Examples
38
+
39
+ Remove section of a modern page
40
+
41
+ ```sh
42
+ m365 spo page section remove --webUrl https://contoso.sharepoint.com/sites/team-a --pageName home.aspx --section 1
43
+ ```
44
+
45
+ ## Response
46
+
47
+ The command won't return a response on success.
@@ -0,0 +1,67 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # viva engage community user add
6
+
7
+ Adds a user to a specific Microsoft 365 Viva Engage community
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 viva engage community user add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --communityId [communityId]`
19
+ : The ID of the Viva Engage community. Specify `communityId`, `communityDisplayName` or `entraGroupId`.
20
+
21
+ `-n, --communityDisplayName [communityDisplayName]`
22
+ : The display name of the Viva Engage community. Specify `communityId`, `communityDisplayName` or `entraGroupId`.
23
+
24
+ `--entraGroupId [entraGroupId]`
25
+ : The ID of the Microsoft 365 group. Specify `communityId`, `communityDisplayName` or `entraGroupId`.
26
+
27
+ `--ids [ids]`
28
+ : Microsoft Entra IDs of users. You can pass a comma-separated list of multiple IDs. Specify either `ids` or `userNames` but not both.
29
+
30
+ `--userNames [userNames]`
31
+ : The user principal names of users. You can pass a comma-separated list of multiple UPNs. Specify either `ids` or `userNames` but not both.
32
+
33
+ `-r, --role <role>`
34
+ : The role to be assigned to the new users. Valid values: `Admin`, `Member`.
35
+ ```
36
+
37
+ <Global />
38
+
39
+ ## Examples
40
+
41
+ Add a single user specified by ID as a member to a community specified by display name.
42
+
43
+ ```sh
44
+ m365 viva engage community user add --communityDisplayName "All company" --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
45
+ ```
46
+
47
+ Add multiple users specified by ID as members to a community specified by ID.
48
+
49
+ ```sh
50
+ m365 viva engage community user add --communityId eyJfdHlwZSI6Ikdyb3VwIiwiaWQiOiIzNjAyMDAxMTAwOSJ9 --ids "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8" --role Member
51
+ ```
52
+
53
+ Add a single user specified by UPN as an admin to a community specified by display name.
54
+
55
+ ```sh
56
+ m365 viva engage community user add --communityDisplayName "All company" --userNames john.doe@contoso.com --role Admin
57
+ ```
58
+
59
+ Adds multiple users specified by UPN as admins to a community specified by its group ID.
60
+
61
+ ```sh
62
+ m365 viva engage community user add --entraGroupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userNames "john.doe@contoso.com,adele.vance@contoso.com" --role Admin
63
+ ```
64
+
65
+ ## Response
66
+
67
+ The command won't return a response on success.
@@ -0,0 +1,55 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # viva engage community user remove
6
+
7
+ Removes a specified user from a Microsoft 365 Viva Engage community
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 viva engage community user remove [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --communityId [communityId]`
19
+ : The ID of the Viva Engage community. Specify `communityId`, `communityDisplayName` or `entraGroupId`.
20
+
21
+ `-n, --communityDisplayName [communityDisplayName]`
22
+ : The display name of the Viva Engage community. Specify `communityId`, `communityDisplayName` or `entraGroupId`.
23
+
24
+ `--entraGroupId [entraGroupId]`
25
+ : The ID of the Microsoft 365 group. Specify `communityId`, `communityDisplayName` or `entraGroupId`.
26
+
27
+ `--id [id]`
28
+ : Microsoft Entra ID of the user. Specify either `id` or `userName` but not both.
29
+
30
+ `--userName [userName]`
31
+ : The user principal name of the user. Specify either `id` or `userName` but not both.
32
+
33
+ `-f, --force`
34
+ : Don't prompt for confirming removing the user from the specified Viva Engage community.
35
+ ```
36
+
37
+ <Global />
38
+
39
+ ## Examples
40
+
41
+ Remove a user specified by ID as a member from a community specified by display name.
42
+
43
+ ```sh
44
+ m365 viva engage community user remove --communityDisplayName "All company" --id 098b9f52-f48c-4401-819f-29c33794c3f5
45
+ ```
46
+
47
+ Remove a user specified by UPN from a community specified by its group ID without confirmation.
48
+
49
+ ```sh
50
+ m365 viva engage community user remove --entraGroupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userName john.doe@contoso.com --force
51
+ ```
52
+
53
+ ## Response
54
+
55
+ The command won't return a response on success.