Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m365 spo homesite remove fails #6491

Open
reshmee011 opened this issue Nov 16, 2024 · 4 comments
Open

m365 spo homesite remove fails #6491

reshmee011 opened this issue Nov 16, 2024 · 4 comments

Comments

@reshmee011
Copy link
Contributor

Priority

(Low) Something is a little off

Description

m365 spo homesite remove fails with Error: Operation is not valid due to the current state of the object.

The code will need to be refactored to use _api/SPO.Tenant/RemoveTargetedSite with additional parameter to accept siteUrl.

Steps to reproduce

m365 spo homesite remove

Expected results

Removes the Home Site

Actual results

Error: Operation is not valid due to the current state of the object.
image

Diagnostics

No response

CLI for Microsoft 365 version

v10.1.0

nodejs version

v20.8.1

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

No response

Additional Info

No response

@milanholemans
Copy link
Contributor

As discussed previously, it is important to note that the new option url should be an optional parameter. Since CLI requires backward compatibility, we cannot introduce breaking changes just yet. This is something we should do in v11.

@reshmee011, are willing to work on this one, or should we open it up?

@reshmee011
Copy link
Contributor Author

@milanholemans : I have added a note for url to be optional.

@waldekmastykarz
Copy link
Member

As discussed previously, it is important to note that the new option url should be an optional parameter. Since CLI requires backward compatibility, we cannot introduce breaking changes just yet. This is something we should do in v11.

Even if the command doesn't work without it? If the underlying API has changed and it now requires the URL, then I suggest that we consider it a bug fix rather than a breaking change and make it required.

@milanholemans
Copy link
Contributor

Even if the command doesn't work without it? If the underlying API has changed and it now requires the URL, then I suggest that we consider it a bug fix rather than a breaking change and make it required.

It's not really a bug I think. These commands were built when you could only register one home site. The APIs of the commands also only work if one home site is configured.
Anyway, Microsoft decided that you can create multiple home sites now, but the APIs we are using now throw errors when you have multiple configured. They only work if you have 1 home site configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants