pnp / cli-microsoft365

Manage Microsoft 365 and SharePoint Framework projects on any platform
https://aka.ms/cli-m365
MIT License
920 stars 325 forks source link

Bug report: Teams clone - Error: Specify one of the following options: id, name, but not multiple. #5451

Closed mmcveigh80 closed 1 year ago

mmcveigh80 commented 1 year ago

Priority

(Low) Something is a little off

Description

Issue with m365 teams team clone

m365 teams team clone --id 5b9232ee-8b7f-4a52-a089-aac25731fdf9 --name "(2024) Testtest" --partsToClone "apps,tabs,settings,channels,members"

Error: Specify one of the following options: id, name, but not multiple.

Steps to reproduce

checked I have the latest

npm install -g @pnp/cli-microsoft365@latest

Expected results

As mentioned about the syntax was a straight copy from your example only change was the id and name

Actual results

Error: Specify one of the following options: id, name, but not multiple.

Diagnostics

No response

CLI for Microsoft 365 version

v6.11.0

nodejs version

v18.17.1

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

No response

Additional Info

No response

mmcveigh80 commented 1 year ago

furthermore. i placed my m365 into interactive mode..

m365 teams team clone --id 5b9232ee-8b7f-4a52-a089-aac25731fdf9 --name "(2024) Testtest" --partsToClone "apps,tabs,settings,channels,members"

Multiple options for an option set specified. Please specify the correct option that you wish to use. ? Option to use: (Use arrow keys)

id name

Why would this be prompted as you require the group ID of the existing teams site as well as the name of the new site. Anyways tried both options but still errors..

milanholemans commented 1 year ago

Hi @mmcveigh80, thank you for creating this issue. At first sight, it seems like you are right. This option validation doesn't belong there. Let's get this fixed. Thanks for reporting this!

mmcveigh80 commented 1 year ago

thank you for the acknowledgement. do you have a timeframe for the fix? Is there an option to try an older working version ?

milanholemans commented 1 year ago

thank you for the acknowledgement. do you have a timeframe for the fix? Is there an option to try an older working version ?

I just made a PR containing the fix for it. It's up to the other maintainers to review it and merge it. Since it's a rather small fix, I'm confident that this review will happen this week or next week.

I just checked the code history, this bug was introduced in v6 of the CLI. So my guess is that the latest v5 version of the CLI should work.

mmcveigh80 commented 1 year ago

thanks for the update..

If I want to test v5 how do I roll back ?

milanholemans commented 1 year ago

Seems like the latest v5 version is 5.9.0. Running npm i -g @pnp/cli-microsoft365@5.9.0 will install that specific version.

mmcveigh80 commented 1 year ago

thank you @milanholemans

Do you know where I can obtain the changes with V5.9.0 compared to the the latest one ? I noticed with 5.9.0 it never cloned the Private channels and Team Site image.

Jwaegebaert commented 1 year ago

Hey @mmcveigh80, all changes made are logged in our release notes. https://pnp.github.io/cli-microsoft365/about/release-notes#v590

Here you should be able to find more info about the command you're using and what changes have been made in a certain version.

mmcveigh80 commented 1 year ago

Hi All. Im getting another weird error message. Im running on version 5.9.0

Error: Failed to execute Skype backend request GetThreadRequest.

milanholemans commented 1 year ago

Could you add a --debug flag to your command to get a little more context?

milanholemans commented 1 year ago

Hi @mmcveigh80

The issue has been fixed in our latest beta release. You can install it by running @pnp/cli-microsoft365@next.

Once again, thank you for reporting this bug. Much appreciated!