v7 Upgrade Guidance
The v7 of CLI for Microsoft 365 introduces several breaking changes. To help you upgrade to the latest version of CLI for Microsoft 365, we've listed those changes along with any actions you may need to take.
Renamed option confirm
to force
in all commands
When doing destructive things like deleting a site, CLI for Microsoft 365 asks you to confirm your intention. In version 7 of the CLI for Microsoft 365, we have renamed the option confirm
to force
in all commands. This change aims to be more consistent with other CLI tools where force
is used to suppress warnings.
What action do I need to take?
Update your scripts to use the new option force
instead of confirm
. Verify that your scripts work as intended.
Renamed aad o365group
commands to aad m365group
In version 7 of the CLI for Microsoft 365, we have renamed the aad o365group
commands to aad m365group
. It has been some time since Office 365 was renamed to Microsoft 365. Office 365 groups are since then named Microsoft 365 groups.
What action do I need to take?
Replace every aad o365group
command with its aad m365group
equivalent in your scripts.
Updated spo file move
options
We updated the spo file move command. The improved functionality support moving files with #
and %
chars in their name. We also added the option to specify a new name for the destination file. When you specify an URL for options webUrl
, sourceUrl
and targetUrl
, make sure that you specify a decoded URL.
Because of this rework, we were able to add new options, but we also had to remove existing ones.
Removed options:
--deleteIfAlreadyExists
--allowSchemaMismatch
New options:
Option | Description |
---|---|
-i, --sourceId [sourceId] | The ID of the file to move. Specify either sourceUrl or sourceId but not both. |
--nameConflictBehavior [nameConflictBehavior] | Behavior when a file or folder with the same name is already present at the destination. Possible values: fail , replace , rename . The default is fail . |
--newName [newName] | New name of the destination file. |
--retainEditorAndModified | Use this option to retain the editor and modified date. When not specified, these values are reset when moving to another library. |
--bypassSharedLock | This indicates whether a file with a share lock can still be moved. Use this option to move a file that is locked. |
What action do I need to take?
Update your scripts to use the new options. Verify that your scripts work as intended.
- Ensure all the URLs you provide are decoded.
- Remove the option
--allowSchemaMismatch
, this is the default behavior now. - Replace option
--deleteIfAlreadyExists
with--nameConflictBehavior replace
.
Updated spo folder copy
options
We updated the spo folder copy command. The improved functionality support copying folders with #
and %
chars in their name. We also added the option to specify a new name for the destination folder. When you specify an URL for options webUrl
, sourceUrl
and targetUrl
, make sure that you specify a decoded URL.
Because of this rework, we were able to add new options, but we also had to remove existing ones.
Removed options:
--allowSchemaMismatch
New options:
Option | Description |
---|---|
-i, --sourceId [sourceId] | The UniqueId (GUID) of the folder. Specify either sourceUrl or sourceId but not both. |
--nameConflictBehavior [nameConflictBehavior] | Behavior when a file or folder with the same name is already present at the destination. Possible values: fail , rename . The default is fail . |
--newName [newName] | New name of the destination folder. |
--resetAuthorAndCreated | Use this option to clear the author and created date. When not specified, the values from the source folder are used. |
--bypassSharedLock | This indicates whether a folder with a shared lock can still be moved. Use this option to copy a folder that is locked. |
What action do I need to take?
Update your scripts to use the new options.
- Ensure all the URLs you provide are decoded.
- Remove the option
--allowSchemaMismatch
, this is the default behavior now.
Updated spo folder move
options
We updated the spo folder move command. The improved functionality support moving folders with #
and %
chars in their name. We also added the option to specify a new name for the destination folder. When you specify an URL for options webUrl
, sourceUrl
and targetUrl
, make sure that you specify a decoded URL.
Because of this rework, we were able to add new options, but we also had to remove existing ones.
Removed options:
--allowSchemaMismatch
New options:
Option | Description |
---|---|
-i, --sourceId [sourceId] | The UniqueId (GUID) of the folder. Specify either sourceUrl or sourceId but not both. |
--nameConflictBehavior [nameConflictBehavior] | Behavior when a file or folder with the same name is already present at the destination. Possible values: fail , rename . The default is fail . |
--newName [newName] | New name of the destination folder. |
--retainEditorAndModified | Use this option to retain the editor and modified date. When not specified, these values are reset. |
--bypassSharedLock | This indicates whether a folder with a shared lock can still be moved. Use this option to move a folder that is locked. |
What action do I need to take?
Update your scripts to use the new options.
- Ensure all the URLs you provide are decoded.
- Remove the option
--allowSchemaMismatch
, this is the default behavior now.
Updated teams meeting list
command output
In the past versions, the command teams meeting list
returned calendar objects as a result. Because of this, the IDs displayed in the output were not the same as the IDs used in the teams meeting get
command and other teams meeting commands. In version 7 of the CLI for Microsoft 365, we have updated the output of the teams meeting list
command to return meeting objects instead of calendar objects. This means that the IDs displayed in the output are now the same as the IDs used in the other teams meeting
commands.
v6 JSON command output:
[
{
"id": "AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E_hLMK5kAAAAAAENAABiOC8xvYmdT6G2E_hLMK5kAAIw3TQIAAA=",
"createdDateTime": "2022-06-26T12:39:34.224055Z",
"lastModifiedDateTime": "2022-06-26T12:41:36.4357085Z",
"changeKey": "YjgvMb2JnU+hthPoSzCuZAACMHITIQ==",
"categories": [],
"transactionId": null,
"originalStartTimeZone": "W. Europe Standard Time",
"originalEndTimeZone": "W. Europe Standard Time",
"iCalUId": "040000008200E00074C5B7101A82E008000000001AF70ACA5989D801000000000000000010000000048716A892ACAE4DB6CC16097796C401",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "Test meeting",
"bodyPreview": "________________________________________________________________________________\r\\\nMicrosoft Teams meeting\r\\\nJoin on your computer or mobile app\r\\\nClick here to join the meeting\r\\\nLearn More | Meeting options\r\\\n___________________________________________",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": true,
"seriesMasterId": null,
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.office365.com/owa/?itemid=AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E%2BhLMK5kAAAAAAENAABiOC8xvYmdT6G2E%2BhLMK5kAAIw3TQIAAA%3D&exvsurl=1&path=/calendar/item",
"onlineMeetingUrl": null,
"isOnlineMeeting": true,
"onlineMeetingProvider": "teamsForBusiness",
"allowNewTimeProposals": true,
"occurrenceId": null,
"isDraft": false,
"hideAttendees": false,
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "<html>\r\\\n<head>\r\\\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\\\n</head>\r\\\n<body>\r\\\n<div><br>\r\\\n<br>\r\\\n<br>\r\\\n<div style=\"width:100%; height:20px\"><span style=\"white-space:nowrap; color:#5F5F5F; opacity:.36\">________________________________________________________________________________</span>\r\\\n</div>\r\\\n<div class=\"me-email-text\" lang=\"en-US\" style=\"color:#252424; font-family:'Segoe UI','Helvetica Neue',Helvetica,Arial,sans-serif\">\r\\\n<div style=\"margin-top:24px; margin-bottom:20px\"><span style=\"font-size:24px; color:#252424\">Microsoft Teams meeting</span>\r\\\n</div>\r\\\n<div style=\"margin-bottom:20px\">\r\\\n<div style=\"margin-top:0px; margin-bottom:0px; font-weight:bold\"><span style=\"font-size:14px; color:#252424\">Join on your computer or mobile app</span>\r\\\n</div>\r\\\n<a href=\"https://teams.microsoft.com/l/meetup-join/19%3ameeting_OWIwM2MzNmQtZmY1My00MzM0LWIxMGQtYzkyNzI3OWU5ODMx%40thread.v2/0?context=%7b%22Tid%22%3a%22e1dd4023-a656-480a-8a0e-c1b1eec51e1d%22%2c%22Oid%22%3a%22fe36f75e-c103-410b-a18a-2bf6df06ac3a%22%7d\" class=\"me-email-headline\" style=\"font-size:14px; font-family:'Segoe UI Semibold','Segoe UI','Helvetica Neue',Helvetica,Arial,sans-serif; text-decoration:underline; color:#6264a7\">Click\r\\\n here to join the meeting</a> </div>\r\\\n<div style=\"margin-bottom:24px; margin-top:20px\"><a href=\"https://aka.ms/JoinTeamsMeeting\" class=\"me-email-link\" style=\"font-size:14px; text-decoration:underline; color:#6264a7; font-family:'Segoe UI','Helvetica Neue',Helvetica,Arial,sans-serif\">Learn More</a>\r\\\n | <a href=\"https://teams.microsoft.com/meetingOptions/?organizerId=fe36f75e-c103-410b-a18a-2bf6df06ac3a&tenantId=e1dd4023-a656-480a-8a0e-c1b1eec51e1d&threadId=19_meeting_OWIwM2MzNmQtZmY1My00MzM0LWIxMGQtYzkyNzI3OWU5ODMx@thread.v2&messageId=0&language=en-US\" class=\"me-email-link\" style=\"font-size:14px; text-decoration:underline; color:#6264a7; font-family:'Segoe UI','Helvetica Neue',Helvetica,Arial,sans-serif\">\r\\\nMeeting options</a> </div>\r\\\n</div>\r\\\n<div style=\"font-size:14px; margin-bottom:4px; font-family:'Segoe UI','Helvetica Neue',Helvetica,Arial,sans-serif\">\r\\\n</div>\r\\\n<div style=\"font-size:12px\"></div>\r\\\n</div>\r\\\n<div style=\"width:100%; height:20px\"><span style=\"white-space:nowrap; color:#5F5F5F; opacity:.36\">________________________________________________________________________________</span>\r\\\n</div>\r\\\n<div></div>\r\\\n</body>\r\\\n</html>\r\\\n"
},
"start": {
"dateTime": "2022-06-26T12:30:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2022-06-26T13:00:00.0000000",
"timeZone": "UTC"
},
"location": {
"displayName": "",
"locationType": "default",
"uniqueIdType": "unknown",
"address": {},
"coordinates": {}
},
"locations": [],
"recurrence": null,
"attendees": [
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "User D",
"address": "userD@outlook.com"
}
}
],
"organizer": {
"emailAddress": {
"name": "User",
"address": "user@tenant.com"
}
},
"onlineMeeting": {
"joinUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_OWIwM2MzNmQtZmY1My00MzM0LWIxMGQtYzkyNzI3OWU5ODMx%40thread.v2/0?context=%7b%22Tid%22%3a%22e1dd4023-a656-480a-8a0e-c1b1eec51e1d%22%2c%22Oid%22%3a%22fe36f75e-c103-410b-a18a-2bf6df06ac3a%22%7d"
}
}
]
v7 JSON command output:
[
{
"id": "MSpiMjA5MWUxOC03ODgyLTRlZmUtYjdkMS05MDcwM2Y1YTVjNjUqMCoqMTk6bWVldGluZ19NakEyWkRrNU5tSXRZak15TVMwMFpURTVMVGxqWW1ZdE9ERmpaVGhrTkRVd016ZGlAdGhyZWFkLnYy",
"creationDateTime": "2023-07-25T19:29:32.033109Z",
"startDateTime": "2023-07-17T03:00:00Z",
"endDateTime": "2023-07-17T04:00:00Z",
"joinUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_MjA2ZDk5NmItYjMyMS00ZTE5LTljYmYtODFjZThkNDUwMzdi%40thread.v2/0?context=%7b%22Tid%22%3a%22ad4f158a-97c7-4914-a9bd-038ecde40ff3%22%2c%22Oid%22%3a%22b2091e18-7882-4efe-b7d1-90703f5a5c65%22%7d",
"joinWebUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_MjA2ZDk5NmItYjMyMS00ZTE5LTljYmYtODFjZThkNDUwMzdi%40thread.v2/0?context=%7b%22Tid%22%3a%22ad4f158a-97c7-4914-a9bd-038ecde40ff3%22%2c%22Oid%22%3a%22b2091e18-7882-4efe-b7d1-90703f5a5c65%22%7d",
"meetingCode": "396464591835",
"subject": "Team meeting",
"isBroadcast": false,
"autoAdmittedUsers": "unknownFutureValue",
"outerMeetingAutoAdmittedUsers": null,
"isEntryExitAnnounced": false,
"allowedPresenters": "everyone",
"allowMeetingChat": "enabled",
"shareMeetingChatHistoryDefault": "none",
"allowTeamworkReactions": true,
"allowAttendeeToEnableMic": true,
"allowAttendeeToEnableCamera": true,
"recordAutomatically": false,
"anonymizeIdentityForRoles": [],
"capabilities": [],
"videoTeleconferenceId": null,
"externalId": null,
"iCalUid": null,
"meetingType": null,
"allowParticipantsToChangeName": false,
"allowRecording": true,
"allowTranscription": true,
"meetingMigrationMode": null,
"broadcastSettings": null,
"audioConferencing": null,
"meetingInfo": null,
"participants": {
"organizer": {
"upn": "john.doe@contoso.com",
"role": "presenter",
"identity": {
"application": null,
"device": null,
"user": {
"id": "b2091e18-7882-4efe-b7d1-90703f5a5c65",
"displayName": null,
"tenantId": "ad4f158a-97c7-4914-a9bd-038ecde40ff3",
"identityProvider": "AAD"
}
}
},
"attendees": [
{
"upn": "adele.vance@contoso.com",
"role": "attendee",
"identity": {
"application": null,
"device": null,
"user": {
"id": "52bd2d9c-2d89-416f-96c4-ca94245e22c8",
"displayName": null,
"tenantId": "ad4f158a-97c7-4914-a9bd-038ecde40ff3",
"identityProvider": "AAD"
}
}
}
]
},
"lobbyBypassSettings": {
"scope": "unknownFutureValue",
"isDialInBypassEnabled": false
},
"joinMeetingIdSettings": {
"isPasscodeRequired": true,
"joinMeetingId": "396464591835",
"passcode": "Z3GYtQ"
},
"chatInfo": {
"threadId": "19:meeting_MjA2ZDk5NmItYjMyMS00ZTE5LTljYmYtODFjZThkNDUwMzdi@thread.v2",
"messageId": "0",
"replyChainMessageId": null
},
"joinInformation": {
"content": "data:text/html,%3cdiv+style%3d%22width%3a100%25%3b%22%3e%0d%0a++++%3cspan+style%3d%22white-space%3anowrap%3bcolor%3a%235F5F5F%3bopacity%3a.36%3b%22%3e________________________________________________________________________________%3c%2fspan%3e%0d%0a%3c%2fdiv%3e%0d%0a+%0d%0a+%3cdiv+class%3d%22me-email-text%22+style%3d%22color%3a%23252424%3bfont-family%3a%27Segoe+UI%27%2c%27Helvetica+Neue%27%2cHelvetica%2cArial%2csans-serif%3b%22+lang%3d%22en-US%22%3e%0d%0a++++%3cdiv+style%3d%22margin-top%3a+24px%3b+margin-bottom%3a+20px%3b%22%3e%0d%0a++++++++%3cspan+style%3d%22font-size%3a+24px%3b+color%3a%23252424%22%3eMicrosoft+Teams+meeting%3c%2fspan%3e%0d%0a++++%3c%2fdiv%3e%0d%0a++++%3cdiv+style%3d%22margin-bottom%3a+20px%3b%22%3e%0d%0a++++++++%3cdiv+style%3d%22margin-top%3a+0px%3b+margin-bottom%3a+0px%3b+font-weight%3a+bold%22%3e%0d%0a++++++++++%3cspan+style%3d%22font-size%3a+14px%3b+color%3a%23252424%22%3eJoin+on+your+computer%2c+mobile+app+or+room+device%3c%2fspan%3e%0d%0a++++++++%3c%2fdiv%3e%0d%0a++++++++%3ca+class%3d%22me-email-headline%22+style%3d%22font-size%3a+14px%3bfont-family%3a%27Segoe+UI+Semibold%27%2c%27Segoe+UI%27%2c%27Helvetica+Neue%27%2cHelvetica%2cArial%2csans-serif%3btext-decoration%3a+underline%3bcolor%3a+%236264a7%3b%22+href%3d%22https%3a%2f%2fteams.microsoft.com%2fl%2fmeetup-join%2f19%253ameeting_MjA2ZDk5NmItYjMyMS00ZTE5LTljYmYtODFjZThkNDUwMzdi%2540thread.v2%2f0%3fcontext%3d%257b%2522Tid%2522%253a%2522ad4f158a-97c7-4914-a9bd-038ecde40ff3%2522%252c%2522Oid%2522%253a%2522b2091e18-7882-4efe-b7d1-90703f5a5c65%2522%257d%22+target%3d%22_blank%22+rel%3d%22noreferrer+noopener%22%3eClick+here+to+join+the+meeting%3c%2fa%3e%0d%0a++++%3c%2fdiv%3e%0d%0a++++%3cdiv+style%3d%22margin-bottom%3a20px%3b+margin-top%3a20px%22%3e%0d%0a++++%3cdiv+style%3d%22margin-bottom%3a4px%22%3e%0d%0a++++++++%3cspan+data-tid%3d%22meeting-code%22+style%3d%22font-size%3a+14px%3b+color%3a%23252424%3b%22%3e%0d%0a++++++++++++Meeting+ID%3a+%3cspan+style%3d%22font-size%3a16px%3b+color%3a%23252424%3b%22%3e396+464+591+835%3c%2fspan%3e%0d%0a+++++++%3c%2fspan%3e%0d%0a+++++++++++%3cbr+%2f%3e%3cspan+style%3d%22font-size%3a+14px%3b+color%3a%23252424%3b%22%3e+Passcode%3a+%3c%2fspan%3e+%3cspan+style%3d%22font-size%3a+16px%3b+color%3a%23252424%3b%22%3e+Z3GYtQ+%3c%2fspan%3e%0d%0a++++++++%3cdiv+style%3d%22font-size%3a+14px%3b%22%3e%3ca+class%3d%22me-email-link%22+style%3d%22font-size%3a+14px%3btext-decoration%3a+underline%3bcolor%3a+%236264a7%3bfont-family%3a%27Segoe+UI%27%2c%27Helvetica+Neue%27%2cHelvetica%2cArial%2csans-serif%3b%22+target%3d%22_blank%22+href%3d%22https%3a%2f%2fwww.microsoft.com%2fen-us%2fmicrosoft-teams%2fdownload-app%22+rel%3d%22noreferrer+noopener%22%3e%0d%0a++++++++Download+Teams%3c%2fa%3e+%7c+%3ca+class%3d%22me-email-link%22+style%3d%22font-size%3a+14px%3btext-decoration%3a+underline%3bcolor%3a+%236264a7%3bfont-family%3a%27Segoe+UI%27%2c%27Helvetica+Neue%27%2cHelvetica%2cArial%2csans-serif%3b%22+target%3d%22_blank%22+href%3d%22https%3a%2f%2fwww.microsoft.com%2fmicrosoft-teams%2fjoin-a-meeting%22+rel%3d%22noreferrer+noopener%22%3eJoin+on+the+web%3c%2fa%3e%3c%2fdiv%3e%0d%0a++++%3c%2fdiv%3e%0d%0a+%3c%2fdiv%3e%0d%0a++++%0d%0a++++++%0d%0a++++%0d%0a++++%0d%0a++++%0d%0a++++%3cdiv+style%3d%22margin-bottom%3a+24px%3bmargin-top%3a+20px%3b%22%3e%0d%0a++++++++%3ca+class%3d%22me-email-link%22+style%3d%22font-size%3a+14px%3btext-decoration%3a+underline%3bcolor%3a+%236264a7%3bfont-family%3a%27Segoe+UI%27%2c%27Helvetica+Neue%27%2cHelvetica%2cArial%2csans-serif%3b%22+target%3d%22_blank%22+href%3d%22https%3a%2f%2faka.ms%2fJoinTeamsMeeting%22+rel%3d%22noreferrer+noopener%22%3eLearn+More%3c%2fa%3e++%7c+%3ca+class%3d%22me-email-link%22+style%3d%22font-size%3a+14px%3btext-decoration%3a+underline%3bcolor%3a+%236264a7%3bfont-family%3a%27Segoe+UI%27%2c%27Helvetica+Neue%27%2cHelvetica%2cArial%2csans-serif%3b%22+target%3d%22_blank%22+href%3d%22https%3a%2f%2fteams.microsoft.com%2fmeetingOptions%2f%3forganizerId%3db2091e18-7882-4efe-b7d1-90703f5a5c65%26tenantId%3dad4f158a-97c7-4914-a9bd-038ecde40ff3%26threadId%3d19_meeting_MjA2ZDk5NmItYjMyMS00ZTE5LTljYmYtODFjZThkNDUwMzdi%40thread.v2%26messageId%3d0%26language%3den-US%22+rel%3d%22noreferrer+noopener%22%3eMeeting+options%3c%2fa%3e+%0d%0a++++++%3c%2fdiv%3e%0d%0a%3c%2fdiv%3e%0d%0a%3cdiv+style%3d%22font-size%3a+14px%3b+margin-bottom%3a+4px%3bfont-family%3a%27Segoe+UI%27%2c%27Helvetica+Neue%27%2cHelvetica%2cArial%2csans-serif%3b%22%3e%0d%0a%0d%0a%3c%2fdiv%3e%0d%0a%3cdiv+style%3d%22font-size%3a+12px%3b%22%3e%0d%0a%0d%0a%3c%2fdiv%3e%0d%0a%0d%0a%3c%2fdiv%3e%0d%0a%3cdiv+style%3d%22width%3a100%25%3b%22%3e%0d%0a++++%3cspan+style%3d%22white-space%3anowrap%3bcolor%3a%235F5F5F%3bopacity%3a.36%3b%22%3e________________________________________________________________________________%3c%2fspan%3e%0d%0a%3c%2fdiv%3e",
"contentType": "html"
},
"watermarkProtection": {
"isEnabledForContentSharing": false,
"isEnabledForVideo": false
}
}
]
What action do I need to take?
Update your scripts to expect the new output format displayed above.
Removed option schemaXml
for spo list
commands
In version 7 of the CLI for Microsoft 365, we have removed the option schemaXml
for the spo list add
and spo list set
commands. This option was used to specify the list schema XML when creating a list. We have removed this option as it is no longer supported by Microsoft 365.
What action do I need to take?
Remove the references to the option schemaXml
from your scripts. Verify that your scripts work as intended.
Removed deleted
option from aad user list
command
In the previous version of CLI for Microsoft 365, you could get deleted users in Azure AD using the command aad user list
and providing an option deleted
. In the latest release, we have removed that option from the command. To get all deleted users in your tenant, you can now use the command aad user recyclebinitem list.
What action do I need to take?
Remove the references to the deleted
option in your scripts. Verify that your scripts are using the command aad user recyclebinitem list instead.
Updated spo tenant commandset set
command with more options
In the previous version of CLI for Microsoft 365, to update a list commandset, you could only specify option id
. In the latest release, we have expanded the feature so that you can also update existing commandset using either of id
or title
or clientSideComponentId
.
What action do I need to take?
Since the option id
was mandatory in v6 and if your scripts are dependent on the default mandatory error output which the command would return, you may have to update your scripts accordingly.
Updated command output for few flow
comands
In version 7 of the CLI for Microsoft 365, we have made an enhancement for the data returned by a few commands. In the previous version, when no items were found, the commands gave no output. This made this command very unpredictable to use in scripts. This has now been changed so an empty array will be outputed when no items were found. Also, when using JSON output, we had duplicate properties in the result. These redundant properties have now been removed.
Here is a list of the affected commands:
What action do I need to take?
- Make sure that your scripts expect an empty array instead of no output when no results are found.
- When you are expecting a JSON output, make sure to recheck the response, few duplicate properties are now removed.
Removed deprecated command aliases
In version 7 of the CLI for Microsoft 365, we have removed deprecated command aliases. These aliases were introduced in previous version to prevent the introduction of breaking changes. The following table lists the deprecated aliases and their replacements.
Alias | Replacement |
---|---|
spo list label get | spo list retentionlabel get |
spo list label set | spo list retentionlabel ensure |
What action do I need to take?
Update your scripts to use the new commands instead of the deprecated aliases. Verify that your scripts work as intended.
Removed deprecated options label
, blockDelete
and blockEdit
from spo list retentionlabel ensure
command
In version 7 of the CLI for Microsoft 365, we have removed the options label
, blockDelete
and blockEdit
from the spo list retentionlabel ensure
command. Both options blockDelete
and blockEdit
were currently being ignored even though they were set when calling the command. The option label
has been removed due to naming conventions.
What action do I need to take?
Remove the references to the option blockDelete
and blockEdit
from commands and replace the option label
to name
if it is currently being used in scripts.
Updated spo tenant applicationcustomizer get
id property to list item id
In version 7 of the CLI for Microsoft 365, we changed the id
property of spo tenant applicationcustomizer get
to be list item id instead of product id (GUID).
What action do I need to take?
Update your scripts to use the list item id for id
property instead of UniqueId product id.
Removed deleted
option from aad o365group list
command
In the previous version of CLI for Microsoft 365, you could get deleted groups in Azure AD using the command aad o365group list
by providing the flag deleted
. In the latest release, we have removed this option from the command. To get all deleted groups in your tenant, you can now use the command aad m365group recyclebinitem list.
What action do I need to take?
In your scripts, use the command aad m365group recyclebinitem list instead of aad o365group list --deleted
.
Enhanced aad o365group get
to return only O365 groups
In version 7 of the CLI for Microsoft 365, we have made an update for the command aad o365group get
. Previously, when executing this command, all groups could be retrieved, even security groups which could lead to misleading results. An extra check has been implemented to ensure that the returned group is effectively a Microsoft 365 group.
What action do I need to take?
Make sure that, if you wish to use a command to retrieve all groups, that you use aad group get, or update your script so it expects an error when retrieving a non-M365 group.
Updated spo theme list
command output
In version 7 of the CLI For Microsoft 365, we have made an adjustment for the data returned by the spo theme list
command. Previously, when no items were found, the command had no output. This made this command very unpredictable to use in scripts. The command has now been updated so an empty array will be logged when no items are found.
What action do I need to take?
Make sure that your script expects an empty array when there are no themes found.
Removed deleted
option from spo site list
command
In the previous version of CLI for Microsoft 365, you could get deleted sites from your SharePoint tenant using the command spo site list
by providing the flag deleted
. In the latest release, we have removed this option from the command. To get all deleted sites in your tenant, you can now use the command spo tenant recyclebinitem list.
What action do I need to take?
In your scripts, use the spo tenant recyclebinitem list command instead of m365 spo site list --deleted
.
Removed deleted
option from aad group list
command
In the previous version of CLI for Microsoft 365, you could get deleted groups in Azure AD using the command aad group list
and providing an option deleted
. In the latest release, we have removed that option from the command. Because only Microsoft 365 groups are stored in your tenant recycle bin, you should now use the command aad m365group recyclebinitem list.
What action do I need to take?
In your scripts, use the aad m365group recyclebinitem list command instead of m365 aad group list --deleted
.
Removed ID
property from response of certain commands
When retrieving certain SharePoint objects, such as list items, the response would contained two ID properties: ID
and Id
. This is the way SharePoint returns the data. In version 7 of the CLI for Microsoft 365, we have removed the ID
property from the response. This to make it easier to convert the JSON response to for example a PowerShell object. Because JSON parsing in PowerShell is not case sensitive, this would result in an error.
We removed the ID
property for the following commands:
- spo file get
- spo listitem add
- spo listitem set
- spo page get
- spo page list
- spo tenant applicationcustomizer list
- spo tenant commandset list
What action do I need to take?
If you are using one of the affected commands listed above, make sure to update your scripts to use the Id
property instead of ID
.
Aligned options with naming convention
In version 7 of the CLI for Microsoft 365, we have made updates to the options for certain commands, aligning with our naming convention. This includes renaming options to ensure consistency and improve the CLI experience. For example, the option --environment
for the command m365 pa app consent set
has been changed to --environmentName
. These changes aim to make it easier for you to use the CLI.
We've updated the following commands and options:
Command | Old option | New option |
---|---|---|
aad app set | uri | uris |
aad approleassignment add | scope | scopes |
aad approleassignment remove | scope | scopes |
aad group get | title | displayName |
aad user set | objectId | id |
aad user set | userPrincipalName | userName |
graph subscription add | changeType | changeTypes |
pa app consent set | environment | environmentName |
pa app export | environment | environmentName |
pa app export | id | name |
pa app export | n (short) | packageDisplayName |
pa app list | environment | environmentName |
pp aibuildermodel get | environment | environmentName |
pp aibuildermodel list | environment | environmentName |
pp aibuildermodel remove | environment | environmentName |
pp card clone | environment | environmentName |
pp card get | environment | environmentName |
pp card list | environment | environmentName |
pp card remove | environment | environmentName |
pp chatbot get | environment | environmentName |
pp chatbot list | environment | environmentName |
pp chatbot remove | environment | environmentName |
pp dataverse table get | environment | environmentName |
pp dataverse table list | environment | environmentName |
pp dataverse table remove | environment | environmentName |
pp dataverse table row list | environment | environmentName |
pp dataverse table row remove | environment | environmentName |
pp solution get | environment | environmentName |
pp solution list | environment | environmentName |
pp solution publish | environment | environmentName |
pp solution remove | environment | environmentName |
pp solution publisher get | environment | environmentName |
pp solution publisher add | environment | environmentName |
pp solution publisher list | environment | environmentName |
pp solution publisher remove | environment | environmentName |
spo file get | w / webUrl (short) | u / webUrl |
spo file get | u / url (short) | url |
spo file list | folder | folderUrl |
spo file remove | w / webUrl (short) | u / webUrl |
spo file remove | u / url (short) | url |
spo file version clear | w / webUrl (short) | u / webUrl |
spo file version clear | u / fileUrl (short) | fileUrl |
spo file version get | w / webUrl (short) | u / webUrl |
spo file version get | u / fileUrl (short) | fileUrl |
spo file version list | w / webUrl (short) | u / webUrl |
spo file version list | u / fileUrl (short) | fileUrl |
spo file version remove | w / webUrl (short) | u / webUrl |
spo file version remove | u / fileUrl (short) | fileUrl |
spo file version restore | w / webUrl (short) | u / webUrl |
spo file version restore | u / fileUrl (short) | fileUrl |
spo group member add | userName | userNames |
spo group member add | email | emails |
spo group member add | userId | userIds |
spo group member add | aadGroupId | aadGroupIds |
spo group member add | aadGroupName | aadGroupNames |
spo listitem attachment list | itemId | listItemId |
spo user get | loginName | userName |
teams channel member add | userId | userIds |
teams channel member add | userDisplayName | userDisplayNames |
What action do I need to take?
If you use any of the commands listed above, ensure that you use the new option names.
Removed 'pa pcf *' commands
In CLI for Microsoft 365 v7 we removed the following commands:
- pa pcf init
- pa solution init
- pa solution reference add
As the PAC CLI evolved, our implementation of these commands got out of date. Since building Power Apps components is still possible only on Windows and we can't improve the process comparing to the PAC CLI, we decided to remove these commands.
What action do I need to take?
Use the PAC CLI to build Power Apps components and solutions.