@pnp/cli-microsoft365 10.0.0-beta.fd332f4 → 10.1.0-beta.10765f6

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 (29) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/m365/commands/login.js +3 -2
  4. package/dist/m365/spe/ContainerProperties.js +2 -0
  5. package/dist/m365/spe/commands/container/container-list.js +87 -0
  6. package/dist/m365/spe/commands/containertype/containertype-get.js +103 -0
  7. package/dist/m365/spe/commands/containertype/containertype-list.js +2 -22
  8. package/dist/m365/spe/commands.js +2 -0
  9. package/dist/m365/spo/commands/folder/folder-sharinglink-set.js +90 -0
  10. package/dist/m365/spo/commands/page/page-publish.js +54 -0
  11. package/dist/m365/spo/commands/tenant/SPOTenantSitePropertiesEnumerable.js +2 -0
  12. package/dist/m365/spo/commands/tenant/TenantSiteProperties.js +2 -0
  13. package/dist/m365/spo/commands/{site/site-list.js → tenant/tenant-site-list.js} +15 -12
  14. package/dist/m365/spo/commands.js +4 -1
  15. package/dist/m365/teams/commands/cache/cache-remove.js +74 -34
  16. package/dist/m365/viva/commands/engage/engage-community-user-list.js +98 -0
  17. package/dist/m365/viva/commands.js +1 -0
  18. package/dist/utils/spo.js +18 -0
  19. package/dist/utils/vivaEngage.js +61 -0
  20. package/docs/docs/cmd/spe/container/container-list.mdx +97 -0
  21. package/docs/docs/cmd/spe/containertype/containertype-get.mdx +114 -0
  22. package/docs/docs/cmd/spo/folder/folder-sharinglink-set.mdx +116 -0
  23. package/docs/docs/cmd/spo/page/page-publish.mdx +41 -0
  24. package/docs/docs/cmd/spo/{site/site-list.mdx → tenant/tenant-site-list.mdx} +13 -7
  25. package/docs/docs/cmd/teams/cache/cache-remove.mdx +10 -1
  26. package/docs/docs/cmd/viva/engage/engage-community-user-list.mdx +123 -0
  27. package/npm-shrinkwrap.json +2 -2
  28. package/package.json +1 -1
  29. package/dist/m365/spe/ContainerTypeProperties.js +0 -2
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _TeamsCacheRemoveCommand_instances, _TeamsCacheRemoveCommand_initTelemetry, _TeamsCacheRemoveCommand_initOptions, _TeamsCacheRemoveCommand_initValidators;
6
+ var _TeamsCacheRemoveCommand_instances, _a, _TeamsCacheRemoveCommand_initTelemetry, _TeamsCacheRemoveCommand_initOptions, _TeamsCacheRemoveCommand_initValidators;
7
7
  import child_process from 'child_process';
8
8
  import fs from 'fs';
9
9
  import { homedir } from 'os';
@@ -30,7 +30,7 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
30
30
  async commandAction(logger, args) {
31
31
  try {
32
32
  if (args.options.force) {
33
- await this.clearTeamsCache(logger);
33
+ await this.clearTeamsCache(args.options.client?.toLowerCase() || 'new', logger);
34
34
  }
35
35
  else {
36
36
  await logger.logToStderr('This command will execute the following steps.');
@@ -38,7 +38,7 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
38
38
  await logger.logToStderr('- Clear the Microsoft Teams cached files.');
39
39
  const result = await cli.promptForConfirmation({ message: `Are you sure you want to clear your Microsoft Teams cache?` });
40
40
  if (result) {
41
- await this.clearTeamsCache(logger);
41
+ await this.clearTeamsCache(args.options.client?.toLowerCase() || 'new', logger);
42
42
  }
43
43
  }
44
44
  }
@@ -46,33 +46,50 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
46
46
  this.handleError(err);
47
47
  }
48
48
  }
49
- async clearTeamsCache(logger) {
50
- const filePath = await this.getTeamsCacheFolderPath(logger);
51
- const folderExists = await this.checkIfCacheFolderExists(filePath, logger);
49
+ async clearTeamsCache(client, logger) {
50
+ const filePaths = await this.getTeamsCacheFolderPaths(client, logger);
51
+ let folderExists = true;
52
+ for (const filePath of filePaths) {
53
+ const exists = await this.checkIfCacheFolderExists(filePath, logger);
54
+ if (!exists) {
55
+ folderExists = false;
56
+ }
57
+ }
52
58
  if (folderExists) {
53
- await this.killRunningProcess(logger);
54
- await this.removeCacheFiles(filePath, logger);
59
+ await this.killRunningProcess(client, logger);
60
+ await this.removeCacheFiles(filePaths, logger);
55
61
  await logger.logToStderr('Teams cache cleared!');
56
62
  }
57
63
  else {
58
64
  await logger.logToStderr('Cache folder does not exist. Nothing to remove.');
59
65
  }
60
66
  }
61
- async getTeamsCacheFolderPath(logger) {
67
+ async getTeamsCacheFolderPaths(client, logger) {
62
68
  const platform = process.platform;
63
69
  if (this.verbose) {
64
70
  await logger.logToStderr(`Getting path of Teams cache folder for platform ${platform}...`);
65
71
  }
66
- let filePath = '';
72
+ const filePaths = [];
67
73
  switch (platform) {
68
74
  case 'win32':
69
- filePath = `${process.env.APPDATA}\\Microsoft\\Teams`;
75
+ if (client === 'classic') {
76
+ filePaths.push(`${process.env.APPDATA}\\Microsoft\\Teams`);
77
+ }
78
+ else {
79
+ filePaths.push(`${process.env.LOCALAPPDATA}\\Packages\\MSTeams_8wekyb3d8bbwe\\LocalCache\\Microsoft\\MSTeams`);
80
+ }
70
81
  break;
71
82
  case 'darwin':
72
- filePath = `${homedir}/Library/Application Support/Microsoft/Teams`;
83
+ if (client === 'classic') {
84
+ filePaths.push(`${homedir}/Library/Application Support/Microsoft/Teams`);
85
+ }
86
+ else {
87
+ filePaths.push(`${homedir}/Library/Group Containers/UBF8T346G9.com.microsoft.teams`);
88
+ filePaths.push(`${homedir}/Library/Containers/com.microsoft.teams2`);
89
+ }
73
90
  break;
74
91
  }
75
- return filePath;
92
+ return filePaths;
76
93
  }
77
94
  async checkIfCacheFolderExists(filePath, logger) {
78
95
  if (this.verbose) {
@@ -80,7 +97,7 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
80
97
  }
81
98
  return fs.existsSync(filePath);
82
99
  }
83
- async killRunningProcess(logger) {
100
+ async killRunningProcess(client, logger) {
84
101
  if (this.verbose) {
85
102
  await logger.logToStderr('Stopping Teams client...');
86
103
  }
@@ -88,61 +105,83 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
88
105
  let cmd = '';
89
106
  switch (platform) {
90
107
  case 'win32':
91
- cmd = 'wmic process where caption="Teams.exe" get ProcessId';
108
+ if (client === 'classic') {
109
+ cmd = 'wmic process where caption="Teams.exe" get ProcessId';
110
+ }
111
+ else {
112
+ cmd = 'wmic process where caption="ms-teams.exe" get ProcessId';
113
+ }
92
114
  break;
93
115
  case 'darwin':
94
- cmd = `ps ax | grep MacOS/Teams -m 1 | grep -v grep | awk '{ print $1 }'`;
116
+ if (client === 'classic') {
117
+ cmd = `ps ax | grep MacOS/Teams -m 1 | grep -v grep | awk '{ print $1 }'`;
118
+ }
119
+ else {
120
+ cmd = `ps ax | grep MacOS/MSTeams -m 1 | grep -v grep | awk '{ print $1 }'`;
121
+ }
95
122
  break;
96
123
  }
97
124
  if (this.debug) {
98
125
  await logger.logToStderr(cmd);
99
126
  }
100
127
  const cmdOutput = await this.exec(cmd);
101
- if (platform === 'darwin') {
128
+ if (platform === 'darwin' && cmdOutput.stdout) {
102
129
  process.kill(parseInt(cmdOutput.stdout));
103
130
  }
104
131
  else if (platform === 'win32') {
105
132
  const processJson = formatting.parseCsvToJson(cmdOutput.stdout);
106
- processJson.filter(proc => proc.ProcessId).map((proc) => {
133
+ for (const proc of processJson) {
107
134
  process.kill(proc.ProcessId);
108
- });
135
+ }
109
136
  }
110
137
  if (this.verbose) {
111
138
  await logger.logToStderr('Teams client closed');
112
139
  }
113
140
  }
114
- async removeCacheFiles(filePath, logger) {
141
+ async removeCacheFiles(filePaths, logger) {
115
142
  if (this.verbose) {
116
143
  await logger.logToStderr('Removing Teams cache files...');
117
144
  }
118
145
  const platform = process.platform;
119
- let cmd = '';
120
- switch (platform) {
121
- case 'win32':
122
- cmd = `rmdir /s /q "${filePath}"`;
123
- break;
124
- case 'darwin':
125
- cmd = `rm -r "${filePath}"`;
126
- break;
127
- }
128
- if (this.debug) {
129
- await logger.logToStderr(cmd);
146
+ const baseCmd = platform === 'win32' ? 'rmdir /s /q ' : 'rm -r ';
147
+ for (const filePath of filePaths) {
148
+ const cmd = `${baseCmd}"${filePath}"`;
149
+ if (this.debug) {
150
+ await logger.logToStderr(cmd);
151
+ }
152
+ try {
153
+ await this.exec(cmd);
154
+ }
155
+ catch (err) {
156
+ if (err?.stderr?.includes('Operation not permitted')) {
157
+ await logger.log('Deleting the folder failed. Please have a look at the following URL to delete the folders manually: https://answers.microsoft.com/en-us/msteams/forum/all/clearing-cache-on-microsoft-teams/35876f6b-eb1a-4b77-bed1-02ce3277091f');
158
+ }
159
+ else {
160
+ throw err;
161
+ }
162
+ }
130
163
  }
131
- await this.exec(cmd);
132
164
  }
133
165
  }
134
- _TeamsCacheRemoveCommand_instances = new WeakSet(), _TeamsCacheRemoveCommand_initTelemetry = function _TeamsCacheRemoveCommand_initTelemetry() {
166
+ _a = TeamsCacheRemoveCommand, _TeamsCacheRemoveCommand_instances = new WeakSet(), _TeamsCacheRemoveCommand_initTelemetry = function _TeamsCacheRemoveCommand_initTelemetry() {
135
167
  this.telemetry.push((args) => {
136
168
  Object.assign(this.telemetryProperties, {
169
+ client: args.options.client,
137
170
  force: !!args.options.force
138
171
  });
139
172
  });
140
173
  }, _TeamsCacheRemoveCommand_initOptions = function _TeamsCacheRemoveCommand_initOptions() {
141
174
  this.options.unshift({
175
+ option: '-c, --client',
176
+ autocomplete: _a.allowedClients
177
+ }, {
142
178
  option: '-f, --force'
143
179
  });
144
180
  }, _TeamsCacheRemoveCommand_initValidators = function _TeamsCacheRemoveCommand_initValidators() {
145
- this.validators.push(async () => {
181
+ this.validators.push(async (args) => {
182
+ if (args.options.client && !_a.allowedClients.includes(args.options.client.toLowerCase())) {
183
+ return `'${args.options.client}' is not a valid value for option 'client'. Allowed values are ${_a.allowedClients.join(', ')}`;
184
+ }
146
185
  if (process.env.CLIMICROSOFT365_ENV === 'docker') {
147
186
  return 'Because you\'re running CLI for Microsoft 365 in a Docker container, we can\'t clear the cache on your host. Instead run this command on your host using "npx ..."';
148
187
  }
@@ -152,5 +191,6 @@ _TeamsCacheRemoveCommand_instances = new WeakSet(), _TeamsCacheRemoveCommand_ini
152
191
  return true;
153
192
  });
154
193
  };
194
+ TeamsCacheRemoveCommand.allowedClients = ['new', 'classic'];
155
195
  export default new TeamsCacheRemoveCommand();
156
196
  //# sourceMappingURL=cache-remove.js.map
@@ -0,0 +1,98 @@
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
3
+ import { zod } from '../../../../utils/zod.js';
4
+ import GraphCommand from '../../../base/GraphCommand.js';
5
+ import commands from '../../commands.js';
6
+ import { validation } from '../../../../utils/validation.js';
7
+ import { vivaEngage } from '../../../../utils/vivaEngage.js';
8
+ import { odata } from '../../../../utils/odata.js';
9
+ const options = globalOptionsZod
10
+ .extend({
11
+ communityId: z.string().optional(),
12
+ communityDisplayName: zod.alias('n', z.string().optional()),
13
+ entraGroupId: z.string()
14
+ .refine(name => validation.isValidGuid(name), name => ({
15
+ message: `'${name}' is not a valid GUID.`
16
+ })).optional(),
17
+ role: zod.alias('r', z.enum(['Admin', 'Member']).optional())
18
+ })
19
+ .strict();
20
+ class VivaEngageCommunityUserListCommand extends GraphCommand {
21
+ get name() {
22
+ return commands.ENGAGE_COMMUNITY_USER_LIST;
23
+ }
24
+ get description() {
25
+ return 'Lists all users within a specified Microsoft 365 Viva Engage community';
26
+ }
27
+ get schema() {
28
+ return options;
29
+ }
30
+ getRefinedSchema(schema) {
31
+ return schema
32
+ .refine(options => [options.communityId, options.communityDisplayName, options.entraGroupId].filter(x => x !== undefined).length === 1, {
33
+ message: 'Specify either communityId, communityDisplayName, or entraGroupId, but not multiple.'
34
+ })
35
+ .refine(options => options.communityId || options.communityDisplayName || options.entraGroupId, {
36
+ message: 'Specify at least one of communityId, communityDisplayName, or entraGroupId.'
37
+ });
38
+ }
39
+ defaultProperties() {
40
+ return ['id', 'displayName', 'userPrincipalName', 'roles'];
41
+ }
42
+ async commandAction(logger, args) {
43
+ try {
44
+ if (this.verbose) {
45
+ await logger.logToStderr('Getting list of users in community...');
46
+ }
47
+ let entraGroupId = args.options.entraGroupId;
48
+ if (args.options.communityDisplayName) {
49
+ const community = await vivaEngage.getCommunityByDisplayName(args.options.communityDisplayName, ['groupId']);
50
+ entraGroupId = community.groupId;
51
+ }
52
+ if (args.options.communityId) {
53
+ const community = await vivaEngage.getCommunityById(args.options.communityId, ['groupId']);
54
+ entraGroupId = community.groupId;
55
+ }
56
+ const requestOptions = {
57
+ url: `${this.resource}/v1.0/groups/${entraGroupId}/members`,
58
+ headers: {
59
+ accept: 'application/json;odata.metadata=none'
60
+ },
61
+ responseType: 'json'
62
+ };
63
+ const members = await odata.getAllItems(requestOptions);
64
+ requestOptions.url = `${this.resource}/v1.0/groups/${entraGroupId}/owners`;
65
+ const owners = await odata.getAllItems(requestOptions);
66
+ const extendedMembers = members.map(m => {
67
+ return {
68
+ ...m,
69
+ roles: ['Member']
70
+ };
71
+ });
72
+ const extendedOwners = owners.map(o => {
73
+ return {
74
+ ...o,
75
+ roles: ['Admin']
76
+ };
77
+ });
78
+ let users = [];
79
+ if (args.options.role) {
80
+ if (args.options.role === 'Member') {
81
+ users = users.concat(extendedMembers);
82
+ }
83
+ if (args.options.role === 'Admin') {
84
+ users = users.concat(extendedOwners);
85
+ }
86
+ }
87
+ else {
88
+ users = extendedOwners.concat(extendedMembers);
89
+ }
90
+ await logger.log(users);
91
+ }
92
+ catch (err) {
93
+ this.handleRejectedODataJsonPromise(err);
94
+ }
95
+ }
96
+ }
97
+ export default new VivaEngageCommunityUserListCommand();
98
+ //# sourceMappingURL=engage-community-user-list.js.map
@@ -4,6 +4,7 @@ export default {
4
4
  ENGAGE_COMMUNITY_ADD: `${prefix} engage community add`,
5
5
  ENGAGE_COMMUNITY_GET: `${prefix} engage community get`,
6
6
  ENGAGE_COMMUNITY_LIST: `${prefix} engage community list`,
7
+ ENGAGE_COMMUNITY_USER_LIST: `${prefix} engage community user list`,
7
8
  ENGAGE_GROUP_LIST: `${prefix} engage group list`,
8
9
  ENGAGE_GROUP_USER_ADD: `${prefix} engage group user add`,
9
10
  ENGAGE_GROUP_USER_REMOVE: `${prefix} engage group user remove`,
package/dist/utils/spo.js CHANGED
@@ -54,6 +54,24 @@ export const spo = {
54
54
  };
55
55
  return context;
56
56
  },
57
+ async getAllContainerTypes(spoAdminUrl, logger, verbose) {
58
+ const formDigestInfo = await spo.ensureFormDigest(spoAdminUrl, logger, undefined, verbose);
59
+ const requestOptions = {
60
+ url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
61
+ headers: {
62
+ 'X-RequestDigest': formDigestInfo.FormDigestValue
63
+ },
64
+ data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="46" ObjectPathId="45" /><Method Name="GetSPOContainerTypes" Id="47" ObjectPathId="45"><Parameters><Parameter Type="Enum">1</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="45" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
65
+ };
66
+ const res = await request.post(requestOptions);
67
+ const json = JSON.parse(res);
68
+ const response = json[0];
69
+ if (response.ErrorInfo) {
70
+ throw new Error(response.ErrorInfo.ErrorMessage);
71
+ }
72
+ const containerTypes = json[json.length - 1];
73
+ return containerTypes;
74
+ },
57
75
  async waitUntilFinished({ operationId, siteUrl, logger, currentContext, debug, verbose }) {
58
76
  const resFormDigest = await spo.ensureFormDigest(siteUrl, logger, currentContext, debug);
59
77
  currentContext = resFormDigest;
@@ -0,0 +1,61 @@
1
+ import { cli } from '../cli/cli.js';
2
+ import request from '../request.js';
3
+ import { formatting } from './formatting.js';
4
+ import { odata } from './odata.js';
5
+ export const vivaEngage = {
6
+ /**
7
+ * Get Viva Engage group ID by community ID.
8
+ * @param communityId The ID of the Viva Engage community.
9
+ * @returns The ID of the Viva Engage group.
10
+ * @returns The Viva Engage community.
11
+ */
12
+ async getCommunityById(communityId, selectProperties) {
13
+ const requestOptions = {
14
+ url: `https://graph.microsoft.com/v1.0/employeeExperience/communities/${communityId}?$select=${selectProperties.join(',')}`,
15
+ headers: {
16
+ accept: 'application/json;odata.metadata=none'
17
+ },
18
+ responseType: 'json'
19
+ };
20
+ const community = await request.get(requestOptions);
21
+ if (!community) {
22
+ throw `The specified Viva Engage community with ID '${communityId}' does not exist.`;
23
+ }
24
+ return community;
25
+ },
26
+ /**
27
+ * Get Viva Engage community by display name.
28
+ * @param displayName Community display name.
29
+ * @param selectProperties Properties to select.
30
+ * @returns The Viva Engage community.
31
+ */
32
+ async getCommunityByDisplayName(displayName, selectProperties) {
33
+ const communities = await odata.getAllItems(`https://graph.microsoft.com/v1.0/employeeExperience/communities?$filter=displayName eq '${formatting.encodeQueryParameter(displayName)}'&$select=${selectProperties.join(',')}`);
34
+ if (communities.length === 0) {
35
+ throw `The specified Viva Engage community '${displayName}' does not exist.`;
36
+ }
37
+ if (communities.length > 1) {
38
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', communities);
39
+ const selectedCommunity = await cli.handleMultipleResultsFound(`Multiple Viva Engage communities with name '${displayName}' found.`, resultAsKeyValuePair);
40
+ return selectedCommunity;
41
+ }
42
+ return communities[0];
43
+ },
44
+ /**
45
+ * Get Viva Engage community by Microsoft Entra group ID.
46
+ * Note: The Graph API doesn't support filtering by groupId, so we need to retrieve all communities and filter them in memory.
47
+ * @param entraGroupId The ID of the Microsoft Entra group.
48
+ * @param selectProperties Properties to select.
49
+ * @returns The Viva Engage community.
50
+ */
51
+ async getCommunityByEntraGroupId(entraGroupId, selectProperties) {
52
+ const properties = selectProperties.includes('groupId') ? selectProperties : [...selectProperties, 'groupId'];
53
+ const communities = await odata.getAllItems(`https://graph.microsoft.com/v1.0/employeeExperience/communities?$select=${properties.join(',')}`);
54
+ const filteredCommunity = communities.find(c => c.groupId === entraGroupId);
55
+ if (!filteredCommunity) {
56
+ throw `The Microsoft Entra group with id '${entraGroupId}' is not associated with any Viva Engage community.`;
57
+ }
58
+ return filteredCommunity;
59
+ }
60
+ };
61
+ //# sourceMappingURL=vivaEngage.js.map
@@ -0,0 +1,97 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # spe container list
6
+
7
+ Lists containers of a specific Container Type
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 spe container list [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `--containerTypeId [containerTypeId]`
19
+ : The Container Type Id of the container instance. Use either `containerTypeId` or `containerTypeName` but not both.
20
+
21
+ `--containerTypeName [containerTypeName]`
22
+ : The Container Type name of the container instance. Use either `containerTypeId` or `containerTypeName` but not both.
23
+ ```
24
+
25
+ <Global />
26
+
27
+ ## Examples
28
+
29
+ List containers of a specific type by id.
30
+
31
+ ```sh
32
+ m365 spe container list --containerTypeId "91710488-5756-407f-9046-fbe5f0b4de73"
33
+ ```
34
+
35
+ List containers of a specific type by name.
36
+
37
+ ```sh
38
+ m365 spe container list --containerTypeName "trial container"
39
+ ```
40
+
41
+ ## Response
42
+
43
+ <Tabs>
44
+ <TabItem value="JSON">
45
+
46
+ ```json
47
+ [
48
+ {
49
+ "id": "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z",
50
+ "displayName": "My File Storage Container",
51
+ "containerTypeId": "e2756c4d-fa33-4452-9c36-2325686e1082",
52
+ "createdDateTime": "2021-11-24T15:41:52.347Z"
53
+ }
54
+ ]
55
+ ```
56
+
57
+ </TabItem>
58
+ <TabItem value="Text">
59
+
60
+ ```text
61
+ id displayName containerTypeId createdDateTime
62
+ ------------------------------------------------------------------ ------------------------- ------------------------------------ ------------------------
63
+ b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z My File Storage Container e2756c4d-fa33-4452-9c36-2325686e1082 2021-11-24T15:41:52.347Z
64
+ ```
65
+
66
+ </TabItem>
67
+ <TabItem value="CSV">
68
+
69
+ ```csv
70
+ id,displayName,containerTypeId,createdDateTime
71
+ b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z,My File Storage Container,e2756c4d-fa33-4452-9c36-2325686e1082,2021-11-24T15:41:52.347Z
72
+ ```
73
+
74
+ </TabItem>
75
+ <TabItem value="Markdown">
76
+
77
+ ```md
78
+ # spe container list
79
+
80
+ Date: 10/06/2024
81
+
82
+ ## My File Storage Container
83
+
84
+ Property | Value
85
+ ---------|-------
86
+ id | b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
87
+ displayName | My File Storage Container
88
+ containerTypeId | e2756c4d-fa33-4452-9c36-2325686e1082
89
+ createdDateTime | 2021-11-24T15:41:52.347Z
90
+ ```
91
+
92
+ </TabItem>
93
+ </Tabs>
94
+
95
+ ## More information
96
+
97
+ In SharePoint Embedded, all files and documents are stored in Containers. The calling app should be the owning app of the container type.
@@ -0,0 +1,114 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # spe containertype get
6
+
7
+ Get a specific Container Type
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 containertype get [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --id [id]`
19
+ : The Id of the Container Type. Specify either id or name but not both.
20
+
21
+ `-n, --name [name]`
22
+ : The Container Type name. Specify either id or name but not both.
23
+ ```
24
+
25
+ <Global />
26
+
27
+ ## Examples
28
+
29
+ Gets Container Type by id
30
+
31
+ ```sh
32
+ m365 spe containertype get --id '4ec4aefd-4fa3-0e4a-20c3-6e68389e7138'
33
+ ```
34
+
35
+ Gets Container Type by name
36
+
37
+ ```sh
38
+ m365 spe containertype get --name 'test container'
39
+ ```
40
+
41
+ ## Response
42
+
43
+ <Tabs>
44
+ <TabItem value="JSON">
45
+
46
+ ```json
47
+ {
48
+ "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPContainerTypeProperties",
49
+ "ApplicationRedirectUrl": null,
50
+ "AzureSubscriptionId": "/Guid(00000000-0000-0000-0000-000000000000)/",
51
+ "ContainerTypeId": "/Guid(073269af-f1d2-042d-2ef5-5bdd6ac83115)/",
52
+ "CreationDate": null,
53
+ "DisplayName": "test1",
54
+ "ExpiryDate": null,
55
+ "IsBillingProfileRequired": true,
56
+ "OwningAppId": "/Guid(df4085cc-9a38-4255-badc-5c5225610475)/",
57
+ "OwningTenantId": "/Guid(00000000-0000-0000-0000-000000000000)/",
58
+ "Region": null,
59
+ "ResourceGroup": null,
60
+ "SPContainerTypeBillingClassification": 0
61
+ }
62
+ ```
63
+
64
+ </TabItem>
65
+ <TabItem value="Text">
66
+
67
+ ```text
68
+ ContainerTypeId DisplayName OwningAppId
69
+ -------------------------------------------- --------------------------------------------- --------------------------------------------
70
+ /Guid(073269af-f1d2-042d-2ef5-5bdd6ac83115)/ test1 /Guid(df4085cc-9a38-4255-badc-5c5225610475)/
71
+ ```
72
+
73
+ </TabItem>
74
+ <TabItem value="CSV">
75
+
76
+ ```csv
77
+ _ObjectType_,ApplicationRedirectUrl,AzureSubscriptionId,ContainerTypeId,CreationDate,DisplayName,ExpiryDate,IsBillingProfileRequired,OwningAppId,OwningTenantId,Region,ResourceGroup,SPContainerTypeBillingClassification
78
+ Microsoft.Online.SharePoint.TenantAdministration.SPContainerTypeProperties,,/Guid(00000000-0000-0000-0000-000000000000)/,/Guid(073269af-f1d2-042d-2ef5-5bdd6ac83115)/,,test1,,1,/Guid(df4085cc-9a38-4255-badc-5c5225610475)/,/Guid(00000000-0000-0000-0000-000000000000)/,,,0
79
+ ```
80
+
81
+ </TabItem>
82
+ <TabItem value="Markdown">
83
+
84
+ ```md
85
+ # spe containertype list
86
+
87
+ Date: 5/11/2024
88
+
89
+ ## test1
90
+
91
+ Property | Value
92
+ ---------|-------
93
+ \_ObjectType\_ | Microsoft.Online.SharePoint.TenantAdministration.SPContainerTypeProperties
94
+ AzureSubscriptionId | /Guid(00000000-0000-0000-0000-000000000000)/
95
+ ContainerTypeId | /Guid(073269af-f1d2-042d-2ef5-5bdd6ac83115)/
96
+ DisplayName | test1
97
+ IsBillingProfileRequired | true
98
+ OwningAppId | /Guid(df4085cc-9a38-4255-badc-5c5225610475)/
99
+ OwningTenantId | /Guid(00000000-0000-0000-0000-000000000000)/
100
+ SPContainerTypeBillingClassification | 0
101
+ ```
102
+
103
+ </TabItem>
104
+ </Tabs>
105
+
106
+ ## More information
107
+
108
+ In SharePoint Embedded, all files and documents are stored in Containers, and each Container is identified by a Container Type.
109
+
110
+ Container Type is a property stamped on every Container instance. Each Container Type is owned by one Application, and each Application can own only one Container Type.
111
+
112
+ The primary function of a Container Type is to manage the application workload that can access the Containers. Container Type defines the access permissions an Application has towards all Containers of that type, including create, read, write, delete containers; manage container permissions, etc.
113
+
114
+ More information about SharePoint Embedded and the limits can be found at the following location: [SharePoint Embedded](https://learn.microsoft.com/en-us/sharepoint/dev/embedded/concepts/app-concepts/containertypes#sharepoint-embedded-trial-container-types)