@pnp/cli-microsoft365 8.0.0-beta.e6f9331 → 8.1.0-beta.3dec9fa
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/.eslintrc.cjs +1 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +1 -9
- package/dist/chili/chili.js +0 -23
- package/dist/cli/cli.js +1 -63
- package/dist/m365/commands/setup.js +0 -4
- package/dist/m365/entra/commands/m365group/m365group-set.js +66 -29
- package/dist/m365/entra/commands/multitenant/MultitenantOrganization.js +2 -0
- package/dist/m365/entra/commands/multitenant/multitenant-get.js +32 -0
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/external/commands/connection/connection-doctor.js +10 -24
- package/dist/m365/flow/commands/flow-list.js +2 -1
- package/dist/m365/graph/commands/subscription/subscription-add.js +4 -2
- package/dist/m365/spfx/commands/project/base-project-command.js +36 -126
- package/dist/m365/spo/commands/contenttype/contenttype-field-list.js +124 -0
- package/dist/m365/spo/commands/field/field-list.js +1 -1
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +2 -3
- package/dist/m365/spo/commands/page/page-text-add.js +2 -3
- package/dist/m365/spo/commands/spo-search.js +3 -4
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-get.js +119 -0
- package/dist/m365/teams/commands/message/message-remove.js +112 -0
- package/dist/m365/teams/commands.js +2 -0
- package/dist/m365/viva/commands/engage/engage-community-add.js +166 -0
- package/dist/m365/viva/commands.js +1 -0
- package/dist/utils/formatting.js +14 -1
- package/dist/utils/teams.js +49 -0
- package/docs/docs/cmd/entra/m365group/m365group-set.mdx +37 -7
- package/docs/docs/cmd/entra/multitenant/multitenant-get.mdx +94 -0
- package/docs/docs/cmd/external/connection/connection-doctor.mdx +9 -9
- package/docs/docs/cmd/graph/subscription/subscription-add.mdx +18 -0
- package/docs/docs/cmd/spo/contenttype/contenttype-field-list.mdx +172 -0
- package/docs/docs/cmd/spo/contenttype/contenttype-list.mdx +3 -3
- package/docs/docs/cmd/spo/field/field-list.mdx +3 -3
- package/docs/docs/cmd/teams/meeting/meeting-attendancereport-get.mdx +138 -0
- package/docs/docs/cmd/teams/message/message-remove.mdx +63 -0
- package/docs/docs/cmd/viva/engage/engage-community-add.mdx +168 -0
- package/npm-shrinkwrap.json +2 -197
- package/package.json +2 -2
|
@@ -0,0 +1,166 @@
|
|
|
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 _VivaEngageCommunityAddCommand_instances, _VivaEngageCommunityAddCommand_initTelemetry, _VivaEngageCommunityAddCommand_initOptions, _VivaEngageCommunityAddCommand_initValidators, _VivaEngageCommunityAddCommand_initTypes, _VivaEngageCommunityAddCommand_initOptionSets;
|
|
7
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
8
|
+
import commands from '../../commands.js';
|
|
9
|
+
import request from '../../../../request.js';
|
|
10
|
+
import { validation } from '../../../../utils/validation.js';
|
|
11
|
+
import { accessToken } from '../../../../utils/accessToken.js';
|
|
12
|
+
import auth from '../../../../Auth.js';
|
|
13
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
14
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
15
|
+
import { setTimeout } from 'timers/promises';
|
|
16
|
+
class VivaEngageCommunityAddCommand extends GraphCommand {
|
|
17
|
+
get name() {
|
|
18
|
+
return commands.ENGAGE_COMMUNITY_ADD;
|
|
19
|
+
}
|
|
20
|
+
get description() {
|
|
21
|
+
return 'Creates a new community in Viva Engage';
|
|
22
|
+
}
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
_VivaEngageCommunityAddCommand_instances.add(this);
|
|
26
|
+
this.pollingInterval = 5000;
|
|
27
|
+
this.privacyOptions = ['public', 'private'];
|
|
28
|
+
__classPrivateFieldGet(this, _VivaEngageCommunityAddCommand_instances, "m", _VivaEngageCommunityAddCommand_initTelemetry).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _VivaEngageCommunityAddCommand_instances, "m", _VivaEngageCommunityAddCommand_initOptions).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _VivaEngageCommunityAddCommand_instances, "m", _VivaEngageCommunityAddCommand_initValidators).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _VivaEngageCommunityAddCommand_instances, "m", _VivaEngageCommunityAddCommand_initTypes).call(this);
|
|
32
|
+
__classPrivateFieldGet(this, _VivaEngageCommunityAddCommand_instances, "m", _VivaEngageCommunityAddCommand_initOptionSets).call(this);
|
|
33
|
+
}
|
|
34
|
+
async commandAction(logger, args) {
|
|
35
|
+
const { displayName, description, privacy, adminEntraIds, adminEntraUserNames, wait } = args.options;
|
|
36
|
+
const isAppOnlyAccessToken = accessToken.isAppOnlyAccessToken(auth.connection.accessTokens[auth.defaultResource].accessToken);
|
|
37
|
+
if (isAppOnlyAccessToken && !adminEntraIds && !adminEntraUserNames) {
|
|
38
|
+
this.handleError(`Specify at least one admin using either adminEntraIds or adminEntraUserNames options when using application permissions.`);
|
|
39
|
+
}
|
|
40
|
+
if (this.verbose) {
|
|
41
|
+
await logger.logToStderr(`Creating a Viva Engage community with display name '${displayName}'...`);
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
const requestOptions = {
|
|
45
|
+
url: `${this.resource}/beta/employeeExperience/communities`,
|
|
46
|
+
headers: {
|
|
47
|
+
accept: 'application/json;odata.metadata=none',
|
|
48
|
+
'content-type': 'application/json'
|
|
49
|
+
},
|
|
50
|
+
responseType: 'json',
|
|
51
|
+
fullResponse: true,
|
|
52
|
+
data: {
|
|
53
|
+
displayName: displayName,
|
|
54
|
+
description: description,
|
|
55
|
+
privacy: privacy
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const entraIds = await this.getGraphUserUrls(args.options);
|
|
59
|
+
if (entraIds.length > 0) {
|
|
60
|
+
requestOptions.data['owners@odata.bind'] = entraIds;
|
|
61
|
+
}
|
|
62
|
+
const res = await request.post(requestOptions);
|
|
63
|
+
const location = res.headers.location;
|
|
64
|
+
if (!wait) {
|
|
65
|
+
await logger.log(location);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
let status;
|
|
69
|
+
do {
|
|
70
|
+
if (this.verbose) {
|
|
71
|
+
await logger.logToStderr(`Community still provisioning. Retrying in ${this.pollingInterval / 1000} seconds...`);
|
|
72
|
+
}
|
|
73
|
+
await setTimeout(this.pollingInterval);
|
|
74
|
+
if (this.verbose) {
|
|
75
|
+
await logger.logToStderr(`Checking create community operation status...`);
|
|
76
|
+
}
|
|
77
|
+
const operation = await request.get({
|
|
78
|
+
url: location,
|
|
79
|
+
headers: {
|
|
80
|
+
accept: 'application/json;odata.metadata=none'
|
|
81
|
+
},
|
|
82
|
+
responseType: 'json'
|
|
83
|
+
});
|
|
84
|
+
status = operation.status;
|
|
85
|
+
if (this.verbose) {
|
|
86
|
+
await logger.logToStderr(`Community creation operation status: ${status}`);
|
|
87
|
+
}
|
|
88
|
+
if (status === 'failed') {
|
|
89
|
+
throw `Community creation failed: ${operation.statusDetail}`;
|
|
90
|
+
}
|
|
91
|
+
if (status === 'succeeded') {
|
|
92
|
+
await logger.log(operation);
|
|
93
|
+
}
|
|
94
|
+
} while (status === 'notStarted' || status === 'running');
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
this.handleRejectedODataJsonPromise(err);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
async getGraphUserUrls(options) {
|
|
101
|
+
let entraIds = [];
|
|
102
|
+
if (options.adminEntraIds) {
|
|
103
|
+
entraIds = formatting.splitAndTrim(options.adminEntraIds);
|
|
104
|
+
}
|
|
105
|
+
else if (options.adminEntraUserNames) {
|
|
106
|
+
entraIds = await entraUser.getUserIdsByUpns(formatting.splitAndTrim(options.adminEntraUserNames));
|
|
107
|
+
}
|
|
108
|
+
const graphUserUrls = entraIds.map(id => `${this.resource}/beta/users/${id}`);
|
|
109
|
+
return graphUserUrls;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
_VivaEngageCommunityAddCommand_instances = new WeakSet(), _VivaEngageCommunityAddCommand_initTelemetry = function _VivaEngageCommunityAddCommand_initTelemetry() {
|
|
113
|
+
this.telemetry.push((args) => {
|
|
114
|
+
Object.assign(this.telemetryProperties, {
|
|
115
|
+
adminEntraIds: typeof args.options.adminEntraIds !== 'undefined',
|
|
116
|
+
adminEntraUserNames: typeof args.options.adminEntraUserNames !== 'undefined',
|
|
117
|
+
wait: !!args.options.wait
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}, _VivaEngageCommunityAddCommand_initOptions = function _VivaEngageCommunityAddCommand_initOptions() {
|
|
121
|
+
this.options.unshift({ option: '--displayName <displayName>' }, { option: '--description <description>' }, {
|
|
122
|
+
option: '--privacy <privacy>',
|
|
123
|
+
autocomplete: this.privacyOptions
|
|
124
|
+
}, { option: '--adminEntraIds [adminEntraIds]' }, { option: '--adminEntraUserNames [adminEntraUserNames]' }, { option: '--wait' });
|
|
125
|
+
}, _VivaEngageCommunityAddCommand_initValidators = function _VivaEngageCommunityAddCommand_initValidators() {
|
|
126
|
+
this.validators.push(async (args) => {
|
|
127
|
+
if (args.options.displayName.length > 255) {
|
|
128
|
+
return `The maximum amount of characters for 'displayName' is 255.`;
|
|
129
|
+
}
|
|
130
|
+
if (args.options.description.length > 1024) {
|
|
131
|
+
return `The maximum amount of characters for 'description' is 1024.`;
|
|
132
|
+
}
|
|
133
|
+
if (this.privacyOptions.indexOf(args.options.privacy) === -1) {
|
|
134
|
+
return `'${args.options.privacy}' is not a valid value for privacy. Allowed values are: ${this.privacyOptions.join(', ')}.`;
|
|
135
|
+
}
|
|
136
|
+
if (args.options.adminEntraIds) {
|
|
137
|
+
const isValidGUIDArrayResult = validation.isValidGuidArray(args.options.adminEntraIds);
|
|
138
|
+
if (isValidGUIDArrayResult !== true) {
|
|
139
|
+
return `The following GUIDs are invalid for the option 'adminEntraIds': ${isValidGUIDArrayResult}.`;
|
|
140
|
+
}
|
|
141
|
+
if (formatting.splitAndTrim(args.options.adminEntraIds).length > 20) {
|
|
142
|
+
return `Maximum of 20 admins allowed. Please reduce the number of users and try again.`;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (args.options.adminEntraUserNames) {
|
|
146
|
+
const isValidUPNArrayResult = validation.isValidUserPrincipalNameArray(args.options.adminEntraUserNames);
|
|
147
|
+
if (isValidUPNArrayResult !== true) {
|
|
148
|
+
return `The following user principal names are invalid for the option 'adminEntraUserNames': ${isValidUPNArrayResult}.`;
|
|
149
|
+
}
|
|
150
|
+
if (formatting.splitAndTrim(args.options.adminEntraUserNames).length > 20) {
|
|
151
|
+
return `Maximum of 20 admins allowed. Please reduce the number of users and try again.`;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return true;
|
|
155
|
+
});
|
|
156
|
+
}, _VivaEngageCommunityAddCommand_initTypes = function _VivaEngageCommunityAddCommand_initTypes() {
|
|
157
|
+
this.types.string.push('displayName', 'description', 'privacy', 'adminEntraIds', 'adminEntraUserNames');
|
|
158
|
+
this.types.boolean.push('wait');
|
|
159
|
+
}, _VivaEngageCommunityAddCommand_initOptionSets = function _VivaEngageCommunityAddCommand_initOptionSets() {
|
|
160
|
+
this.optionSets.push({
|
|
161
|
+
options: ['adminEntraIds', 'adminEntraUserNames'],
|
|
162
|
+
runsWhen: (args) => args.options.adminEntraIds || args.options.adminEntraUserNames
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
export default new VivaEngageCommunityAddCommand();
|
|
166
|
+
//# sourceMappingURL=engage-community-add.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const prefix = 'viva';
|
|
2
2
|
export default {
|
|
3
3
|
CONNECTIONS_APP_CREATE: `${prefix} connections app create`,
|
|
4
|
+
ENGAGE_COMMUNITY_ADD: `${prefix} engage community add`,
|
|
4
5
|
ENGAGE_COMMUNITY_GET: `${prefix} engage community get`,
|
|
5
6
|
ENGAGE_GROUP_LIST: `${prefix} engage group list`,
|
|
6
7
|
ENGAGE_GROUP_USER_ADD: `${prefix} engage group user add`,
|
package/dist/utils/formatting.js
CHANGED
|
@@ -9,6 +9,8 @@ export var CheckStatus;
|
|
|
9
9
|
(function (CheckStatus) {
|
|
10
10
|
CheckStatus[CheckStatus["Success"] = 0] = "Success";
|
|
11
11
|
CheckStatus[CheckStatus["Failure"] = 1] = "Failure";
|
|
12
|
+
CheckStatus[CheckStatus["Information"] = 2] = "Information";
|
|
13
|
+
CheckStatus[CheckStatus["Warning"] = 3] = "Warning";
|
|
12
14
|
})(CheckStatus || (CheckStatus = {}));
|
|
13
15
|
export const formatting = {
|
|
14
16
|
escapeXml(s) {
|
|
@@ -152,7 +154,18 @@ export const formatting = {
|
|
|
152
154
|
process.env.TERM === 'xterm-256color';
|
|
153
155
|
const success = primarySupported ? '✔' : '√';
|
|
154
156
|
const failure = primarySupported ? '✖' : '×';
|
|
155
|
-
|
|
157
|
+
const information = 'i';
|
|
158
|
+
const warning = '!';
|
|
159
|
+
switch (result) {
|
|
160
|
+
case CheckStatus.Success:
|
|
161
|
+
return `${chalk.green(success)} ${message}`;
|
|
162
|
+
case CheckStatus.Failure:
|
|
163
|
+
return `${chalk.red(failure)} ${message}`;
|
|
164
|
+
case CheckStatus.Information:
|
|
165
|
+
return `${chalk.blue(information)} ${message}`;
|
|
166
|
+
case CheckStatus.Warning:
|
|
167
|
+
return `${chalk.yellow(warning)} ${message}`;
|
|
168
|
+
}
|
|
156
169
|
},
|
|
157
170
|
convertArrayToHashTable(key, array) {
|
|
158
171
|
const resultAsKeyValuePair = {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { formatting } from './formatting.js';
|
|
2
|
+
import { odata } from './odata.js';
|
|
3
|
+
import { cli } from '../cli/cli.js';
|
|
4
|
+
const graphResource = 'https://graph.microsoft.com';
|
|
5
|
+
export const teams = {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieve the id of a team by its name.
|
|
8
|
+
* @param displayName Name of the team to retrieve.
|
|
9
|
+
* @throws Error if the team cannot be found.
|
|
10
|
+
* @throws Error when multiple teams with the same name and prompting is disabled.
|
|
11
|
+
* @returns The ID of the team.
|
|
12
|
+
*/
|
|
13
|
+
async getTeamIdByDisplayName(displayName) {
|
|
14
|
+
const teams = await odata.getAllItems(`${graphResource}/v1.0/teams?$filter=displayName eq '${formatting.encodeQueryParameter(displayName)}'&$select=id`);
|
|
15
|
+
if (!teams.length) {
|
|
16
|
+
throw Error(`The specified team '${displayName}' does not exist.`);
|
|
17
|
+
}
|
|
18
|
+
if (teams.length > 1) {
|
|
19
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', teams);
|
|
20
|
+
const result = await cli.handleMultipleResultsFound(`Multiple teams with name '${displayName}' found.`, resultAsKeyValuePair);
|
|
21
|
+
return result.id;
|
|
22
|
+
}
|
|
23
|
+
return teams[0].id;
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves the channel ID by its name in a Microsoft Teams team.
|
|
27
|
+
* @param teamId The ID of the team.
|
|
28
|
+
* @param name The name of the channel.
|
|
29
|
+
* @returns The ID of the channel.
|
|
30
|
+
* @throws Throws an error if the specified channel does not exist in the team.
|
|
31
|
+
*/
|
|
32
|
+
async getChannelIdByDisplayName(teamId, name) {
|
|
33
|
+
const channelRequestOptions = {
|
|
34
|
+
url: `${graphResource}/v1.0/teams/${teamId}/channels?$filter=displayName eq '${formatting.encodeQueryParameter(name)}'&$select=id`,
|
|
35
|
+
headers: {
|
|
36
|
+
accept: 'application/json;odata.metadata=none'
|
|
37
|
+
},
|
|
38
|
+
responseType: 'json'
|
|
39
|
+
};
|
|
40
|
+
const response = await odata.getAllItems(channelRequestOptions);
|
|
41
|
+
// Only one channel can have the same name in a team
|
|
42
|
+
const channelItem = response[0];
|
|
43
|
+
if (!channelItem) {
|
|
44
|
+
throw Error(`The channel '${name}' does not exist in the Microsoft Teams team with ID '${teamId}'.`);
|
|
45
|
+
}
|
|
46
|
+
return channelItem.id;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=teams.js.map
|
|
@@ -35,10 +35,22 @@ m365 aad m365group set [options]
|
|
|
35
35
|
: Comma-separated list of Microsoft 365 Group members to add
|
|
36
36
|
|
|
37
37
|
`--isPrivate [isPrivate]`
|
|
38
|
-
: Set to true if the Microsoft 365 Group should be private and
|
|
38
|
+
: Set to `true` if the Microsoft 365 Group should be private and `false` if it should be public.
|
|
39
39
|
|
|
40
40
|
`-l, --logoPath [logoPath]`
|
|
41
41
|
: Local path to the image file to use as group logo
|
|
42
|
+
|
|
43
|
+
`--allowExternalSenders [allowExternalSenders]`
|
|
44
|
+
: Indicates if people external to the organization can send messages to the group. Valid values: `true`, `false`.
|
|
45
|
+
|
|
46
|
+
`--autoSubscribeNewMembers [autoSubscribeNewMembers]`
|
|
47
|
+
: Indicates if new members added to the group will be auto-subscribed to receive email notifications. Valid values: `true`, `false`.
|
|
48
|
+
|
|
49
|
+
`--hideFromAddressLists [hideFromAddressLists]`
|
|
50
|
+
: Indicates if the group is not displayed in certain parts of the Outlook UI: the Address Book, address lists for selecting message recipients, and the Browse Groups dialog for searching groups. Valid values: `true`, `false`.
|
|
51
|
+
|
|
52
|
+
`--hideFromOutlookClients [hideFromOutlookClients]`
|
|
53
|
+
: Indicates if the group is not displayed in Outlook clients, such as Outlook for Windows and Outlook on the web. Valid values: `true`, `false`.
|
|
42
54
|
```
|
|
43
55
|
|
|
44
56
|
<Global />
|
|
@@ -49,38 +61,56 @@ When updating group's owners and members, the command will add newly specified u
|
|
|
49
61
|
|
|
50
62
|
When specifying the path to the logo image you can use both relative and absolute paths. Note, that ~ in the path, will not be resolved and will most likely result in an error.
|
|
51
63
|
|
|
64
|
+
:::note
|
|
65
|
+
|
|
66
|
+
Options `allowExternalSenders` and `autoSubscribeNewMembers` can only be set using delegated permissions.
|
|
67
|
+
|
|
68
|
+
:::
|
|
69
|
+
|
|
52
70
|
## Examples
|
|
53
71
|
|
|
54
|
-
Update Microsoft 365 Group display name
|
|
72
|
+
Update Microsoft 365 Group display name.
|
|
55
73
|
|
|
56
74
|
```sh
|
|
57
75
|
m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --displayName Finance
|
|
58
76
|
```
|
|
59
77
|
|
|
60
|
-
Change Microsoft 365 Group visibility to public
|
|
78
|
+
Change Microsoft 365 Group visibility to public.
|
|
61
79
|
|
|
62
80
|
```sh
|
|
63
|
-
m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --isPrivate false
|
|
81
|
+
m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --isPrivate `false`
|
|
64
82
|
```
|
|
65
83
|
|
|
66
|
-
Add new Microsoft 365 Group owners
|
|
84
|
+
Add new Microsoft 365 Group owners.
|
|
67
85
|
|
|
68
86
|
```sh
|
|
69
87
|
m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --owners "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
|
|
70
88
|
```
|
|
71
89
|
|
|
72
|
-
Add new Microsoft 365 Group members
|
|
90
|
+
Add new Microsoft 365 Group members.
|
|
73
91
|
|
|
74
92
|
```sh
|
|
75
93
|
m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --members "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
|
|
76
94
|
```
|
|
77
95
|
|
|
78
|
-
Update Microsoft 365 Group logo
|
|
96
|
+
Update Microsoft 365 Group logo.
|
|
79
97
|
|
|
80
98
|
```sh
|
|
81
99
|
m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --logoPath images/logo.png
|
|
82
100
|
```
|
|
83
101
|
|
|
102
|
+
Hide the Microsoft 365 group from the address lists and the Outlook clients.
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --hideFromOutlookClients true --hideFromAddressLists true
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Auto-subscribe new members to receive email notifications and do not allow external senders to send messages to the group.
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --autoSubscribeNewMembers true --allowExternalSenders false
|
|
112
|
+
```
|
|
113
|
+
|
|
84
114
|
## Response
|
|
85
115
|
|
|
86
116
|
The command won't return a response on success.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
|
|
2
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
3
|
+
import Tabs from '@theme/Tabs';
|
|
4
|
+
import TabItem from '@theme/TabItem';
|
|
5
|
+
|
|
6
|
+
# entra multitenant get
|
|
7
|
+
|
|
8
|
+
Gets properties of the multitenant organization
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
m365 entra multitenant get [options]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Options
|
|
17
|
+
|
|
18
|
+
<Global />
|
|
19
|
+
|
|
20
|
+
## Remarks
|
|
21
|
+
|
|
22
|
+
:::info
|
|
23
|
+
|
|
24
|
+
To use this command you must be at least **Security Administrator**.
|
|
25
|
+
|
|
26
|
+
:::
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
Gets properties of the multitenant organization
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
m365 entra multitenant get
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Response
|
|
37
|
+
|
|
38
|
+
<Tabs>
|
|
39
|
+
<TabItem value="JSON">
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"id": "c231d4a5-138f-4bdf-9fee-f26a90ea3ad0",
|
|
44
|
+
"createdDateTime": "2024-05-05T05:05:05Z",
|
|
45
|
+
"state": "active",
|
|
46
|
+
"displayName": "Contoso organization",
|
|
47
|
+
"description": "Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank"
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
</TabItem>
|
|
52
|
+
<TabItem value="Text">
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
createdDateTime: 2024-05-05T05:05:05Z
|
|
56
|
+
description : Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank
|
|
57
|
+
displayName : Contoso organization
|
|
58
|
+
id : c231d4a5-138f-4bdf-9fee-f26a90ea3ad0
|
|
59
|
+
state : active
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
</TabItem>
|
|
63
|
+
<TabItem value="CSV">
|
|
64
|
+
|
|
65
|
+
```csv
|
|
66
|
+
id,createdDateTime,state,displayName,description
|
|
67
|
+
c231d4a5-138f-4bdf-9fee-f26a90ea3ad0,2024-05-05T05:05:05Z,active,Contoso organization,"Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
</TabItem>
|
|
71
|
+
<TabItem value="Markdown">
|
|
72
|
+
|
|
73
|
+
```md
|
|
74
|
+
# entra multitenant get
|
|
75
|
+
|
|
76
|
+
Date: 5/5/2024
|
|
77
|
+
|
|
78
|
+
## Contoso organization (c231d4a5-138f-4bdf-9fee-f26a90ea3ad0)
|
|
79
|
+
|
|
80
|
+
Property | Value
|
|
81
|
+
---------|-------
|
|
82
|
+
id | c231d4a5-138f-4bdf-9fee-f26a90ea3ad0
|
|
83
|
+
createdDateTime | 2024-05-05T05:05:05Z
|
|
84
|
+
state | active
|
|
85
|
+
displayName | Contoso organization
|
|
86
|
+
description | Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
</TabItem>
|
|
90
|
+
</Tabs>
|
|
91
|
+
|
|
92
|
+
## More information
|
|
93
|
+
|
|
94
|
+
- Multitenant organization: https://learn.microsoft.com/entra/identity/multi-tenant-organizations/overview
|
|
@@ -126,15 +126,15 @@ m365 external connection doctor --id contosoproducts --ux copilot
|
|
|
126
126
|
<TabItem value="Text">
|
|
127
127
|
|
|
128
128
|
```text
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
√ Load connection
|
|
130
|
+
√ Load schema
|
|
131
|
+
× Required semantic labels: Missing label iconUrl
|
|
132
|
+
√ Searchable properties
|
|
133
|
+
√ Items have content ingested
|
|
134
|
+
i Connection configured for inline results (manual)
|
|
135
|
+
i Items have activities recorded (manual)
|
|
136
|
+
i Meaningful connection name and description (manual)
|
|
137
|
+
√ urlToItemResolver configured
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
</TabItem>
|
|
@@ -67,6 +67,24 @@ Create a subscription using the maximum allowed expiration for Group resources
|
|
|
67
67
|
m365 graph subscription add --resource groups --changeTypes "updated" --notificationUrl "https://webhook.azurewebsites.net/api/send/myNotifyClient"
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
+
Create a subscription for Event Hub location if you are using Key Vault
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
m365 graph subscription add --resource user --changeTypes "created,updated,deleted" --notificationUrl "EventHub:https://azureKeyVaultName.vault.azure.net/secrets/secretName?tenantId=contoso.com"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Create a subscription for Event Hub location if you are using role-based access control
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
m365 graph subscription add --resource user --changeTypes "created,updated,deleted" --notificationUrl "EventHub:https://eventHubNamespace.servicebus.windows.net/eventhubname/eventHubName?tenantId=contoso.com"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Create a subscription for Event Grid Partner Topic.
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
m365 graph subscription add --resource user --changeTypes "created,updated,deleted" --notificationUrl "EventGrid:?azuresubscriptionid=8A8A8A8A-4B4B-4C4C-4D4D-12E12E12E12E&resourcegroup=resourceGroupName&partnertopic=partnerTopicName&location=partnerTopicAzureRegionName"
|
|
86
|
+
```
|
|
87
|
+
|
|
70
88
|
## Response
|
|
71
89
|
|
|
72
90
|
<Tabs>
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spo contenttype field list
|
|
6
|
+
|
|
7
|
+
Lists fields for a given site or list content type
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spo contenttype field list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-u, --webUrl <webUrl>`
|
|
19
|
+
: Absolute URL of the site where the content type is located.
|
|
20
|
+
|
|
21
|
+
`-i, --contentTypeId [contentTypeId]`
|
|
22
|
+
: The ID of the content type for which to list fields. Specify either `contentTypeId` or `contentTypeName`.
|
|
23
|
+
|
|
24
|
+
`-n, --contentTypeName [contentTypeName]`
|
|
25
|
+
: The name of the content type for which to list fields. Specify either `contentTypeId` or `contentTypeName`.
|
|
26
|
+
|
|
27
|
+
`-l, --listTitle [listTitle]`
|
|
28
|
+
: Optional title of the list where the content type is located. Specify either `listTitle`, `listId` or `listUrl`.
|
|
29
|
+
|
|
30
|
+
`--listId [listId]`
|
|
31
|
+
: Optional ID of the list where the content type is located. Specify either `listTitle`, `listId` or `listUrl`.
|
|
32
|
+
|
|
33
|
+
`--listUrl [listUrl]`
|
|
34
|
+
: Optional server- or web-relative URL of the list where the content type is located. Specify either `listTitle`, `listId` or `listUrl`.
|
|
35
|
+
|
|
36
|
+
`-p, --properties [properties]`
|
|
37
|
+
: Comma-separated list of properties to retrieve. Will retrieve all properties if not specified.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
<Global />
|
|
41
|
+
|
|
42
|
+
## Examples
|
|
43
|
+
|
|
44
|
+
Retrieves fields for the specified site content type.
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spo contenttype field list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --contentTypeId "0x01"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Retrieves fields for the specified list content type in the Documents library.
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 spo contenttype field list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --contentTypeName "Document" --listTitle "Documents"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Response
|
|
57
|
+
|
|
58
|
+
<Tabs>
|
|
59
|
+
<TabItem value="JSON">
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
[
|
|
63
|
+
{
|
|
64
|
+
"AutoIndexed": false,
|
|
65
|
+
"CanBeDeleted": false,
|
|
66
|
+
"ClientSideComponentId": "00000000-0000-0000-0000-000000000000",
|
|
67
|
+
"ClientSideComponentProperties": null,
|
|
68
|
+
"ClientValidationFormula": null,
|
|
69
|
+
"ClientValidationMessage": null,
|
|
70
|
+
"CustomFormatter": null,
|
|
71
|
+
"DefaultFormula": null,
|
|
72
|
+
"DefaultValue": null,
|
|
73
|
+
"Description": "",
|
|
74
|
+
"Direction": "none",
|
|
75
|
+
"EnforceUniqueValues": false,
|
|
76
|
+
"EntityPropertyName": "Title",
|
|
77
|
+
"Filterable": true,
|
|
78
|
+
"FromBaseType": true,
|
|
79
|
+
"Group": "_Hidden",
|
|
80
|
+
"Hidden": false,
|
|
81
|
+
"Id": "fa564e0f-0c70-4ab9-b863-0177e6ddd247",
|
|
82
|
+
"Indexed": false,
|
|
83
|
+
"IndexStatus": 0,
|
|
84
|
+
"InternalName": "Title",
|
|
85
|
+
"IsModern": false,
|
|
86
|
+
"JSLink": "clienttemplates.js",
|
|
87
|
+
"PinnedToFiltersPane": false,
|
|
88
|
+
"ReadOnlyField": false,
|
|
89
|
+
"Required": true,
|
|
90
|
+
"SchemaXml": "<Field ID=\"{fa564e0f-0c70-4ab9-b863-0177e6ddd247}\" Name=\"Title\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Title\" Group=\"_Hidden\" Type=\"Text\" DisplayName=\"Title\" Required=\"TRUE\" FromBaseType=\"TRUE\" DelayActivateTemplateBinding=\"GROUP,SPSPERS,SITEPAGEPUBLISHING\" Customization=\"\" ShowInNewForm=\"TRUE\" ShowInEditForm=\"TRUE\"></Field>",
|
|
91
|
+
"Scope": "/",
|
|
92
|
+
"Sealed": false,
|
|
93
|
+
"ShowInFiltersPane": 0,
|
|
94
|
+
"Sortable": true,
|
|
95
|
+
"StaticName": "Title",
|
|
96
|
+
"Title": "Title",
|
|
97
|
+
"FieldTypeKind": 2,
|
|
98
|
+
"TypeAsString": "Text",
|
|
99
|
+
"TypeDisplayName": "Single line of text",
|
|
100
|
+
"TypeShortDescription": "Single line of text",
|
|
101
|
+
"ValidationFormula": null,
|
|
102
|
+
"ValidationMessage": null,
|
|
103
|
+
"MaxLength": 255
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
</TabItem>
|
|
109
|
+
<TabItem value="Text">
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
Id Title InternalName Hidden
|
|
113
|
+
------------------------------------ ------ ------------ ------
|
|
114
|
+
5ee2dd25-d941-455a-9bdb-7f2c54aed11b Title Title false
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
</TabItem>
|
|
118
|
+
<TabItem value="CSV">
|
|
119
|
+
|
|
120
|
+
```csv
|
|
121
|
+
AutoIndexed,CanBeDeleted,ClientSideComponentId,ClientSideComponentProperties,ClientValidationFormula,ClientValidationMessage,CustomFormatter,DefaultFormula,DefaultValue,Description,Direction,EnforceUniqueValues,EntityPropertyName,Filterable,FromBaseType,Group,Hidden,Id,Indexed,IndexStatus,InternalName,IsModern,JSLink,PinnedToFiltersPane,ReadOnlyField,Required,SchemaXml,Scope,Sealed,ShowInFiltersPane,Sortable,StaticName,Title,FieldTypeKind,TypeAsString,TypeDisplayName,TypeShortDescription,ValidationFormula,ValidationMessage,EnableLookup
|
|
122
|
+
,,00000000-0000-0000-0000-000000000000,,,,,,,,none,,ContentType,1,,_Hidden,,c042a256-787d-4a6f-8a8a-cf6ab767f12d,,0,ContentType,,,,,,"<Field ID=""{c042a256-787d-4a6f-8a8a-cf6ab767f12d}"" Name=""ContentType"" SourceID=""http://schemas.microsoft.com/sharepoint/v3"" StaticName=""ContentType"" Group=""_Hidden"" Type=""Computed"" DisplayName=""Content Type"" Sealed=""TRUE"" Sortable=""FALSE"" RenderXMLUsingPattern=""TRUE"" PITarget=""MicrosoftWindowsSharePointServices"" PIAttribute=""ContentTypeID"" DelayActivateTemplateBinding=""GROUP,SPSPERS,SITEPAGEPUBLISHING"" Customization=""""><FieldRefs><FieldRef ID=""{03e45e84-1992-4d42-9116-26f756012634}"" Name=""ContentTypeId"" /></FieldRefs><DisplayPattern><MapToContentType><Column Name=""ContentTypeId"" /></MapToContentType></DisplayPattern></Field>",/,1,0,,ContentType,Content Type,12,Computed,Computed,Computed,,,
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
</TabItem>
|
|
126
|
+
<TabItem value="Markdown">
|
|
127
|
+
|
|
128
|
+
```md
|
|
129
|
+
# spo contenttype field list --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --contentTypeId "0x01"
|
|
130
|
+
|
|
131
|
+
Date: 10/04/2024
|
|
132
|
+
|
|
133
|
+
## Title (fa564e0f-0c70-4ab9-b863-0177e6ddd247)
|
|
134
|
+
|
|
135
|
+
Property | Value
|
|
136
|
+
---------|-------
|
|
137
|
+
AutoIndexed | false
|
|
138
|
+
CanBeDeleted | false
|
|
139
|
+
ClientSideComponentId | 00000000-0000-0000-0000-000000000000
|
|
140
|
+
Description |
|
|
141
|
+
Direction | none
|
|
142
|
+
EnforceUniqueValues | false
|
|
143
|
+
EntityPropertyName | Title
|
|
144
|
+
Filterable | true
|
|
145
|
+
FromBaseType | true
|
|
146
|
+
Group | \_Hidden
|
|
147
|
+
Hidden | false
|
|
148
|
+
Id | fa564e0f-0c70-4ab9-b863-0177e6ddd247
|
|
149
|
+
Indexed | false
|
|
150
|
+
IndexStatus | 0
|
|
151
|
+
InternalName | Title
|
|
152
|
+
IsModern | false
|
|
153
|
+
JSLink | clienttemplates.js
|
|
154
|
+
PinnedToFiltersPane | false
|
|
155
|
+
ReadOnlyField | false
|
|
156
|
+
Required | true
|
|
157
|
+
SchemaXml | <Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" Group="\_Hidden" Type="Text" DisplayName="Title" Required="TRUE" FromBaseType="TRUE" DelayActivateTemplateBinding="GROUP,SPSPERS,SITEPAGEPUBLISHING" Customization="" ShowInNewForm="TRUE" ShowInEditForm="TRUE"></Field>
|
|
158
|
+
Scope | /
|
|
159
|
+
Sealed | false
|
|
160
|
+
ShowInFiltersPane | 0
|
|
161
|
+
Sortable | true
|
|
162
|
+
StaticName | Title
|
|
163
|
+
Title | Title
|
|
164
|
+
FieldTypeKind | 2
|
|
165
|
+
TypeAsString | Text
|
|
166
|
+
TypeDisplayName | Single line of text
|
|
167
|
+
TypeShortDescription | Single line of text
|
|
168
|
+
MaxLength | 255
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
</TabItem>
|
|
172
|
+
</Tabs>
|
|
@@ -88,9 +88,9 @@ m365 spo contenttype list --webUrl "https://contoso.sharepoint.com/sites/contoso
|
|
|
88
88
|
<TabItem value="Text">
|
|
89
89
|
|
|
90
90
|
```text
|
|
91
|
-
StringId
|
|
92
|
-
|
|
93
|
-
0x01007926A45D687BA842B947286090B8F67D
|
|
91
|
+
StringId Name Hidden ReadOnly Sealed
|
|
92
|
+
-------------------------------------- --------- ------ -------- ------
|
|
93
|
+
0x01007926A45D687BA842B947286090B8F67D PnP Alert false false false
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
</TabItem>
|