@pnp/cli-microsoft365 7.10.0-beta.a743796 → 7.10.0
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.
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +1 -1
- package/dist/chili/chili.js +9 -77
- package/dist/m365/entra/commands/app/app-permission-remove.js +287 -0
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/spo/commands/file/file-add.js +41 -38
- package/dist/m365/spo/commands/site/site-admin-list.js +144 -0
- package/dist/m365/spo/commands/site/site-set.js +22 -24
- package/dist/m365/spo/commands/tenant/tenant-site-archive.js +99 -0
- package/dist/m365/spo/commands/tenant/tenant-site-unarchive.js +98 -0
- package/dist/m365/spo/commands.js +3 -0
- package/dist/m365/teams/commands/user/user-app-add.js +17 -17
- package/dist/m365/teams/commands/user/user-app-upgrade.js +106 -0
- package/dist/m365/teams/commands.js +2 -1
- package/dist/utils/md.js +2 -2
- package/docs/docs/cmd/entra/app/app-permission-remove.mdx +60 -0
- package/docs/docs/cmd/spo/site/site-admin-list.mdx +115 -0
- package/docs/docs/cmd/spo/tenant/tenant-site-archive.mdx +63 -0
- package/docs/docs/cmd/spo/tenant/tenant-site-unarchive.mdx +67 -0
- package/docs/docs/cmd/status.mdx +10 -9
- package/docs/docs/cmd/teams/user/user-app-upgrade.mdx +59 -0
- package/npm-shrinkwrap.json +181 -90
- package/package.json +16 -15
|
@@ -26,24 +26,24 @@ class TeamsUserAppAddCommand extends GraphCommand {
|
|
|
26
26
|
__classPrivateFieldGet(this, _TeamsUserAppAddCommand_instances, "m", _TeamsUserAppAddCommand_initOptionSets).call(this);
|
|
27
27
|
}
|
|
28
28
|
async commandAction(logger, args) {
|
|
29
|
-
const appId = await this.getAppId(args);
|
|
30
|
-
const userId = (args.options.userId ?? args.options.userName);
|
|
31
|
-
const endpoint = `${this.resource}/v1.0`;
|
|
32
|
-
if (this.verbose) {
|
|
33
|
-
await logger.logToStderr(`Removing app with ID ${appId} for user ${args.options.userId}`);
|
|
34
|
-
}
|
|
35
|
-
const requestOptions = {
|
|
36
|
-
url: `${endpoint}/users/${formatting.encodeQueryParameter(userId)}/teamwork/installedApps`,
|
|
37
|
-
headers: {
|
|
38
|
-
'content-type': 'application/json;odata=nometadata',
|
|
39
|
-
'accept': 'application/json;odata.metadata=none'
|
|
40
|
-
},
|
|
41
|
-
responseType: 'json',
|
|
42
|
-
data: {
|
|
43
|
-
'teamsApp@odata.bind': `${endpoint}/appCatalogs/teamsApps/${appId}`
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
29
|
try {
|
|
30
|
+
const appId = await this.getAppId(args);
|
|
31
|
+
const userId = (args.options.userId ?? args.options.userName);
|
|
32
|
+
const endpoint = `${this.resource}/v1.0`;
|
|
33
|
+
if (this.verbose) {
|
|
34
|
+
await logger.logToStderr(`Adding app with ID ${appId} for user ${args.options.userId}`);
|
|
35
|
+
}
|
|
36
|
+
const requestOptions = {
|
|
37
|
+
url: `${endpoint}/users/${formatting.encodeQueryParameter(userId)}/teamwork/installedApps`,
|
|
38
|
+
headers: {
|
|
39
|
+
'content-type': 'application/json;odata=nometadata',
|
|
40
|
+
'accept': 'application/json;odata.metadata=none'
|
|
41
|
+
},
|
|
42
|
+
responseType: 'json',
|
|
43
|
+
data: {
|
|
44
|
+
'teamsApp@odata.bind': `${endpoint}/appCatalogs/teamsApps/${appId}`
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
47
|
await request.post(requestOptions);
|
|
48
48
|
}
|
|
49
49
|
catch (err) {
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
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
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
6
|
+
var _TeamsUserAppUpgradeCommand_instances, _TeamsUserAppUpgradeCommand_initTelemetry, _TeamsUserAppUpgradeCommand_initOptions, _TeamsUserAppUpgradeCommand_initValidators, _TeamsUserAppUpgradeCommand_initOptionSets, _TeamsUserAppUpgradeCommand_initTypes;
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
|
+
import request from '../../../../request.js';
|
|
9
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
import { odata } from '../../../../utils/odata.js';
|
|
11
|
+
import { validation } from '../../../../utils/validation.js';
|
|
12
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
|
+
import commands from '../../commands.js';
|
|
14
|
+
class TeamsUserAppUpgradeCommand extends GraphCommand {
|
|
15
|
+
get name() {
|
|
16
|
+
return commands.USER_APP_UPGRADE;
|
|
17
|
+
}
|
|
18
|
+
get description() {
|
|
19
|
+
return 'Upgrade an app in the personal scope of the specified user';
|
|
20
|
+
}
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
_TeamsUserAppUpgradeCommand_instances.add(this);
|
|
24
|
+
__classPrivateFieldGet(this, _TeamsUserAppUpgradeCommand_instances, "m", _TeamsUserAppUpgradeCommand_initTelemetry).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _TeamsUserAppUpgradeCommand_instances, "m", _TeamsUserAppUpgradeCommand_initOptions).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _TeamsUserAppUpgradeCommand_instances, "m", _TeamsUserAppUpgradeCommand_initValidators).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _TeamsUserAppUpgradeCommand_instances, "m", _TeamsUserAppUpgradeCommand_initOptionSets).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _TeamsUserAppUpgradeCommand_instances, "m", _TeamsUserAppUpgradeCommand_initTypes).call(this);
|
|
29
|
+
}
|
|
30
|
+
async commandAction(logger, args) {
|
|
31
|
+
try {
|
|
32
|
+
if (this.verbose) {
|
|
33
|
+
await logger.logToStderr(`Upgrading app ${args.options.id || args.options.name} for user ${args.options.userId || args.options.userName}`);
|
|
34
|
+
}
|
|
35
|
+
const installedAppId = await this.getInstalledAppId(args.options, logger);
|
|
36
|
+
const requestOptions = {
|
|
37
|
+
url: `${this.resource}/v1.0/users/${formatting.encodeQueryParameter(args.options.userId || args.options.userName)}/teamwork/installedApps/${installedAppId}/upgrade`,
|
|
38
|
+
headers: {
|
|
39
|
+
'accept': 'application/json;odata.metadata=none'
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
await request.post(requestOptions);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
this.handleRejectedODataJsonPromise(err);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async getInstalledAppId(options, logger) {
|
|
49
|
+
if (this.verbose) {
|
|
50
|
+
await logger.logToStderr(`Retrieving app ID`);
|
|
51
|
+
}
|
|
52
|
+
if (options.id) {
|
|
53
|
+
return options.id;
|
|
54
|
+
}
|
|
55
|
+
const installedApps = await odata.getAllItems(`${this.resource}/v1.0/users/${formatting.encodeQueryParameter(options.userId || options.userName)}/teamwork/installedApps?$expand=teamsAppDefinition&$filter=teamsAppDefinition/displayName eq '${formatting.encodeQueryParameter(options.name)}'&$select=id`);
|
|
56
|
+
if (installedApps.length === 1) {
|
|
57
|
+
return installedApps[0].id;
|
|
58
|
+
}
|
|
59
|
+
if (installedApps.length === 0) {
|
|
60
|
+
throw `The specified Teams app ${options.name} does not exist or is not installed for the user`;
|
|
61
|
+
}
|
|
62
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', installedApps);
|
|
63
|
+
const result = (await cli.handleMultipleResultsFound(`Multiple installed Teams apps with name '${options.name}' found.`, resultAsKeyValuePair));
|
|
64
|
+
return result.id;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
_TeamsUserAppUpgradeCommand_instances = new WeakSet(), _TeamsUserAppUpgradeCommand_initTelemetry = function _TeamsUserAppUpgradeCommand_initTelemetry() {
|
|
68
|
+
this.telemetry.push((args) => {
|
|
69
|
+
Object.assign(this.telemetryProperties, {
|
|
70
|
+
id: typeof args.options.id !== 'undefined',
|
|
71
|
+
name: typeof args.options.name !== 'undefined',
|
|
72
|
+
userId: typeof args.options.userId !== 'undefined',
|
|
73
|
+
userName: typeof args.options.userName !== 'undefined'
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}, _TeamsUserAppUpgradeCommand_initOptions = function _TeamsUserAppUpgradeCommand_initOptions() {
|
|
77
|
+
this.options.unshift({
|
|
78
|
+
option: '--id [id]'
|
|
79
|
+
}, {
|
|
80
|
+
option: '--name [name]'
|
|
81
|
+
}, {
|
|
82
|
+
option: '--userId [userId]'
|
|
83
|
+
}, {
|
|
84
|
+
option: '--userName [userName]'
|
|
85
|
+
});
|
|
86
|
+
}, _TeamsUserAppUpgradeCommand_initValidators = function _TeamsUserAppUpgradeCommand_initValidators() {
|
|
87
|
+
this.validators.push(async (args) => {
|
|
88
|
+
if (args.options.userId && !validation.isValidGuid(args.options.userId)) {
|
|
89
|
+
return `${args.options.userId} is not a valid GUID`;
|
|
90
|
+
}
|
|
91
|
+
if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
|
|
92
|
+
return `${args.options.userName} is not a valid userName`;
|
|
93
|
+
}
|
|
94
|
+
return true;
|
|
95
|
+
});
|
|
96
|
+
}, _TeamsUserAppUpgradeCommand_initOptionSets = function _TeamsUserAppUpgradeCommand_initOptionSets() {
|
|
97
|
+
this.optionSets.push({
|
|
98
|
+
options: ['id', 'name']
|
|
99
|
+
}, {
|
|
100
|
+
options: ['userId', 'userName']
|
|
101
|
+
});
|
|
102
|
+
}, _TeamsUserAppUpgradeCommand_initTypes = function _TeamsUserAppUpgradeCommand_initTypes() {
|
|
103
|
+
this.types.string.push('id', 'name', 'userId', 'userName');
|
|
104
|
+
};
|
|
105
|
+
export default new TeamsUserAppUpgradeCommand();
|
|
106
|
+
//# sourceMappingURL=user-app-upgrade.js.map
|
|
@@ -67,6 +67,7 @@ export default {
|
|
|
67
67
|
USER_SET: `${prefix} user set`,
|
|
68
68
|
USER_APP_ADD: `${prefix} user app add`,
|
|
69
69
|
USER_APP_LIST: `${prefix} user app list`,
|
|
70
|
-
USER_APP_REMOVE: `${prefix} user app remove
|
|
70
|
+
USER_APP_REMOVE: `${prefix} user app remove`,
|
|
71
|
+
USER_APP_UPGRADE: `${prefix} user app upgrade`
|
|
71
72
|
};
|
|
72
73
|
//# sourceMappingURL=commands.js.map
|
package/dist/utils/md.js
CHANGED
|
@@ -22,7 +22,7 @@ function includeContent(md, rootFolder) {
|
|
|
22
22
|
{ tag: "<CLISettings />", location: "docs/_clisettings.mdx" }
|
|
23
23
|
];
|
|
24
24
|
mdxImports.forEach(mdxImport => {
|
|
25
|
-
md = md.replace(mdxImport.tag, () => fs.readFileSync(path.join(rootFolder, mdxImport.location), 'utf8')).replace(/(```\r
|
|
25
|
+
md = md.replace(mdxImport.tag, () => fs.readFileSync(path.join(rootFolder, mdxImport.location), 'utf8')).replace(/(```\r?\n)\r?\n(```md definition-list\r?\n)/g, "$1$2");
|
|
26
26
|
});
|
|
27
27
|
return md;
|
|
28
28
|
}
|
|
@@ -54,7 +54,7 @@ function convertContentTabs(md) {
|
|
|
54
54
|
.trim();
|
|
55
55
|
}
|
|
56
56
|
function convertCodeFences(md) {
|
|
57
|
-
const regex = new RegExp('^```.*?(?:\r
|
|
57
|
+
const regex = new RegExp('^```.*?(?:\r?\n)(.*?)```(?:\r?\n)', 'gms');
|
|
58
58
|
return md.replace(regex, (match, code) => {
|
|
59
59
|
return `${code.replace(/^(.+)$/gm, ' $1')}${EOL}`;
|
|
60
60
|
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# entra app permission remove
|
|
4
|
+
|
|
5
|
+
Removes the specified application and/or delegated permissions from a specified Entra app.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 entra app permission remove [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`-i, --appId [appId]`
|
|
17
|
+
: Client ID of the Microsoft Entra app to remove the API permissions from. Specify either `appId`, `appName` or `appObjectId`.
|
|
18
|
+
|
|
19
|
+
`--appObjectId [appObjectId]`
|
|
20
|
+
: Object ID of the Microsoft Entra app to remove the API permissions from. Specify either `appId`, `appName` or `appObjectId`.
|
|
21
|
+
|
|
22
|
+
`-n, --appName [appName]`
|
|
23
|
+
: Display name of the Entra app to remove the API permissions from. Specify either `appId`, `appName` or `appObjectId`.
|
|
24
|
+
|
|
25
|
+
`-a, --applicationPermissions [applicationPermissions]`
|
|
26
|
+
: Space-separated list of application permissions to remove. Specify at least `applicationPermissions` or `delegatedPermissions`.
|
|
27
|
+
|
|
28
|
+
`-d, --delegatedPermissions [delegatedPermissions]`
|
|
29
|
+
: Space-separated list of delegated permissions to remove. Specify at least `applicationPermissions` or `delegatedPermissions`.
|
|
30
|
+
|
|
31
|
+
`--revokeAdminConsent`
|
|
32
|
+
: When specified, revokes the admin consent for the specified permissions as well.
|
|
33
|
+
|
|
34
|
+
`-f, --force`
|
|
35
|
+
: Don't prompt for confirmation to remove the permissions.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
<Global />
|
|
39
|
+
|
|
40
|
+
## Remarks
|
|
41
|
+
|
|
42
|
+
Removing permissions on App Registrations does not immediately remove consent given by an administrator. Explicitly instruct the CLI to revoke consent by using the `--revokeAdminConsent` flag.
|
|
43
|
+
|
|
44
|
+
## Examples
|
|
45
|
+
|
|
46
|
+
Remove multiple delegated API permissions from an Entra app registration
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
m365 entra app permission remove --appId 'f1417aa3-bf0b-4cc5-a845-a0b2cf11f690' --delegatedPermissions 'https://management.azure.com/user_impersonation https://service.flow.microsoft.com/Flows.Read.All https://graph.microsoft.com/Agreement.Read.All'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Remove multiple app-only permissions from an Entra app registration and revoke admin consent
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
m365 entra app permission remove --appId 'f1417aa3-bf0b-4cc5-a845-a0b2cf11f690' --applicationPermissions 'https://graph.microsoft.com/Sites.FullControl.All https://microsoft.sharepoint-df.com/Sites.FullControl.All' --revokeAdminConsent
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Response
|
|
59
|
+
|
|
60
|
+
The command won't return a response on success.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spo site admin list
|
|
6
|
+
|
|
7
|
+
Lists all administrators of a specific SharePoint site
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo site admin list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --siteUrl <siteUrl>`
|
|
19
|
+
: The URL of the SharePoint site
|
|
20
|
+
|
|
21
|
+
`--asAdmin`
|
|
22
|
+
: List admins as admin for sites you don't have permission to
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<Global />
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
:::info
|
|
30
|
+
|
|
31
|
+
To use this command with the `--asAdmin` mode, you must have permission to access the tenant admin site.
|
|
32
|
+
|
|
33
|
+
Without this parameter, you must have site collection admin permissions for the requested site.
|
|
34
|
+
|
|
35
|
+
In `--asAdmin` mode, the Id, PrincipalType, and PrincipalTypeString properties are not exported.
|
|
36
|
+
|
|
37
|
+
:::
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
Lists all admins of a SharePoint site
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 spo site admin list --siteUrl https://contoso.sharepoint.com
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Lists all admins of a SharePoint site as admin
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 spo site admin list --siteUrl https://contoso.sharepoint.com --asAdmin
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Response
|
|
54
|
+
|
|
55
|
+
<Tabs>
|
|
56
|
+
<TabItem value="JSON">
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
[
|
|
60
|
+
{
|
|
61
|
+
"Id": 6,
|
|
62
|
+
"LoginName": "i:0#.f|membership|user@contoso.com",
|
|
63
|
+
"Title": "User Example",
|
|
64
|
+
"PrincipalType": 1,
|
|
65
|
+
"PrincipalTypeString": "User",
|
|
66
|
+
"Email": "user@contoso.com",
|
|
67
|
+
"IsPrimaryAdmin": true
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
</TabItem>
|
|
73
|
+
<TabItem value="Text">
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
Email : user@contoso.com
|
|
77
|
+
Id : 6
|
|
78
|
+
LoginName : i:0#.f|membership|user@contoso.com
|
|
79
|
+
PrincipalType : 1
|
|
80
|
+
PrincipalTypeString : User
|
|
81
|
+
Title : User Example
|
|
82
|
+
IsPrimaryAdmin : true
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
</TabItem>
|
|
86
|
+
<TabItem value="CSV">
|
|
87
|
+
|
|
88
|
+
```csv
|
|
89
|
+
Id,LoginName,Title,PrincipalType,PrincipalTypeString,Email,IsPrimaryAdmin
|
|
90
|
+
6,i:0#.f|membership|user@contoso.com,User Example,1,User,user@contoso.com,1
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
</TabItem>
|
|
94
|
+
<TabItem value="Markdown">
|
|
95
|
+
|
|
96
|
+
```md
|
|
97
|
+
# spo site admin list --siteUrl "https://contoso.sharepoint.com/sites/Test"
|
|
98
|
+
|
|
99
|
+
Date: 20/03/2024
|
|
100
|
+
|
|
101
|
+
## User
|
|
102
|
+
|
|
103
|
+
Property | Value
|
|
104
|
+
---------|-------
|
|
105
|
+
Id | 6
|
|
106
|
+
LoginName | i:0#.f\|membership\|user@contoso.com
|
|
107
|
+
Title | User Example
|
|
108
|
+
PrincipalType | 1
|
|
109
|
+
PrincipalTypeString | User
|
|
110
|
+
Email | user@contoso.com
|
|
111
|
+
IsPrimaryAdmin | true
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
</TabItem>
|
|
115
|
+
</Tabs>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spo tenant site archive
|
|
6
|
+
|
|
7
|
+
Archives a site collection
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo tenant site archive [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --url <url>`
|
|
19
|
+
: URL of the site collection.
|
|
20
|
+
|
|
21
|
+
`-f, --force`
|
|
22
|
+
: Don't prompt for confirmation.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<Global />
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
:::info
|
|
30
|
+
|
|
31
|
+
To use this command, you must be a Global or SharePoint administrator.
|
|
32
|
+
|
|
33
|
+
:::
|
|
34
|
+
|
|
35
|
+
:::note
|
|
36
|
+
|
|
37
|
+
After running this command, it may take a few minutes for the site to be fully archived.
|
|
38
|
+
|
|
39
|
+
:::
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Examples
|
|
43
|
+
|
|
44
|
+
Archive a specific SharePoint site collection
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spo tenant site archive --url "https://contoso.sharepoint.com/sites/Marketing"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Archive a specific SharePoint site collection without confirmation prompt
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 spo tenant site archive --url "https://contoso.sharepoint.com/sites/Marketing" --force
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Response
|
|
57
|
+
|
|
58
|
+
The command won't return a response on success.
|
|
59
|
+
|
|
60
|
+
## More information
|
|
61
|
+
|
|
62
|
+
- Pricing model for Microsoft 365 Archive: [https://learn.microsoft.com/microsoft-365/archive/archive-pricing](https://learn.microsoft.com/microsoft-365/archive/archive-pricing)
|
|
63
|
+
- Set up Microsoft 365 Archive: [https://learn.microsoft.com/microsoft-365/archive/archive-setup](https://learn.microsoft.com/microsoft-365/archive/archive-setup)
|
|
@@ -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
|
+
# spo tenant site unarchive
|
|
6
|
+
|
|
7
|
+
Unarchives a site collection
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo tenant site unarchive [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --url <url>`
|
|
19
|
+
: URL of the site collection.
|
|
20
|
+
|
|
21
|
+
`-f, --force`
|
|
22
|
+
: Don't prompt for confirmation.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<Global />
|
|
26
|
+
|
|
27
|
+
## Remarks
|
|
28
|
+
|
|
29
|
+
:::info
|
|
30
|
+
|
|
31
|
+
To use this command, you must be a Global or SharePoint administrator.
|
|
32
|
+
|
|
33
|
+
:::
|
|
34
|
+
|
|
35
|
+
:::warning
|
|
36
|
+
|
|
37
|
+
If a site remains archived for more than **seven days**, the reactivation fee will be calculated based on the entire storage capacity of the site.
|
|
38
|
+
|
|
39
|
+
:::
|
|
40
|
+
|
|
41
|
+
:::note
|
|
42
|
+
|
|
43
|
+
After running this command, it may take a few minutes for the site to be fully restored.
|
|
44
|
+
|
|
45
|
+
:::
|
|
46
|
+
|
|
47
|
+
## Examples
|
|
48
|
+
|
|
49
|
+
Unarchive a specific site collection.
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
m365 spo tenant site unarchive --url "https://contoso.sharepoint.com/sites/Marketing"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Unarchive a specific site collection without confirmation prompt.
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
m365 spo tenant site unarchive --url "https://contoso.sharepoint.com/sites/Marketing" --force
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Response
|
|
62
|
+
|
|
63
|
+
The command won't return a response on success.
|
|
64
|
+
|
|
65
|
+
## More information
|
|
66
|
+
|
|
67
|
+
- Pricing model for Microsoft 365 Archive: [https://learn.microsoft.com/microsoft-365/archive/archive-pricing](https://learn.microsoft.com/microsoft-365/archive/archive-pricing)
|
package/docs/docs/cmd/status.mdx
CHANGED
|
@@ -35,6 +35,7 @@ m365 status
|
|
|
35
35
|
|
|
36
36
|
```json
|
|
37
37
|
{
|
|
38
|
+
"connectionName": "dd8b99a7-77c6-4238-a609-396d27844921",
|
|
38
39
|
"connectedAs": "john.doe@contoso.onmicrosoft.com",
|
|
39
40
|
"authType": "DeviceCode",
|
|
40
41
|
"appId": "31359c7f-bd7e-475c-86db-fdb8c937548e",
|
|
@@ -47,19 +48,20 @@ m365 status
|
|
|
47
48
|
<TabItem value="Text">
|
|
48
49
|
|
|
49
50
|
```text
|
|
50
|
-
appId
|
|
51
|
-
appTenant
|
|
52
|
-
authType
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
appId : 31359c7f-bd7e-475c-86db-fdb8c937548e
|
|
52
|
+
appTenant : common
|
|
53
|
+
authType : DeviceCode
|
|
54
|
+
cloudType : Public
|
|
55
|
+
connectedAs : john.doe@contoso.onmicrosoft.com
|
|
56
|
+
connectionName: dd8b99a7-77c6-4238-a609-396d27844921
|
|
55
57
|
```
|
|
56
58
|
|
|
57
59
|
</TabItem>
|
|
58
60
|
<TabItem value="CSV">
|
|
59
61
|
|
|
60
62
|
```csv
|
|
61
|
-
connectedAs,authType,appId,appTenant,cloudType
|
|
62
|
-
john.doe@contoso.onmicrosoft.com,DeviceCode,31359c7f-bd7e-475c-86db-fdb8c937548e,common,Public
|
|
63
|
+
connectionName,connectedAs,authType,appId,appTenant,cloudType
|
|
64
|
+
dd8b99a7-77c6-4238-a609-396d27844921,john.doe@contoso.onmicrosoft.com,DeviceCode,31359c7f-bd7e-475c-86db-fdb8c937548e,common,Public
|
|
63
65
|
```
|
|
64
66
|
|
|
65
67
|
</TabItem>
|
|
@@ -70,10 +72,9 @@ m365 status
|
|
|
70
72
|
|
|
71
73
|
Date: 7/2/2023
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
|
|
75
75
|
Property | Value
|
|
76
76
|
---------|-------
|
|
77
|
+
connectionName | dd8b99a7-77c6-4238-a609-396d27844921
|
|
77
78
|
connectedAs | john.doe@contoso.onmicrosoft.com
|
|
78
79
|
authType | DeviceCode
|
|
79
80
|
appId | 31359c7f-bd7e-475c-86db-fdb8c937548e
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# teams user app upgrade
|
|
4
|
+
|
|
5
|
+
Upgrade an app in the personal scope of the specified user
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 teams user app upgrade [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`--id [id]`
|
|
17
|
+
: The unique id of the app instance installed for the user. Specify either `id` or `name`.
|
|
18
|
+
|
|
19
|
+
`--name [name]`
|
|
20
|
+
: Name of the app instance installed for the user. Specify either `id` or `name`.
|
|
21
|
+
|
|
22
|
+
`--userId [userId]`
|
|
23
|
+
: The ID of the user to upgrade the app for. Specify either `userId` or `userName` but not both.
|
|
24
|
+
|
|
25
|
+
`--userName [userName]`
|
|
26
|
+
: The UPN of the user to upgrade the app for. Specify either `userId` or `userName` but not both.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
<Global />
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
Upgrade an app by name for the specified user using its UPN.
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
m365 teams user app upgrade --name HelloWorld --userName admin@contoso.com
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Upgrade an app by name for the specified user using its id.
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
m365 teams user app upgrade --name HelloWorld --userId 2609af39-7775-4f94-a3dc-0dd67657e900
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Upgrade an app by id for the specified user using its UPN.
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
m365 teams user app upgrade --id YzUyN2E0NzAtYTg4Mi00ODFjLTk4MWMtZWU2ZWZhYmE4NWM3IyM0ZDFlYTA0Ny1mMTk2LTQ1MGQtYjJlOS0wZDI4NTViYTA1YTY= --userName admin@contoso.com
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Upgrade an app by id for the specified user using its id.
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
m365 teams user app upgrade --id YzUyN2E0NzAtYTg4Mi00ODFjLTk4MWMtZWU2ZWZhYmE4NWM3IyM0ZDFlYTA0Ny1mMTk2LTQ1MGQtYjJlOS0wZDI4NTViYTA1YTY= --userId 2609af39-7775-4f94-a3dc-0dd67657e900
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Response
|
|
58
|
+
|
|
59
|
+
The command won't return a response on success.
|