Skip to content

Bug report: Unable to remove a orphaned groupified site #2706

@michaelmaillot

Description

@michaelmaillot

Description

When running the spo site remove command with a site collection (which Microsoft 365 Group has been deleted) as a parameter, the CLI returns a 404 error.

Steps to reproduce

  1. Create or locate a groupified site collection
  2. Remove the Microsoft 365 Group linked to it (with the aad o365group remove --skipRecycleBin command for example)
  3. Run the spo site remove command

Expected results

The command should be able to remove the site collection even if its Group is already deleted.

Actual results

The command returns the following error:

Error: Request failed with status code 404

Diagnostics

No response

CLI for Microsoft 365 version

3.13.0

nodejs version

14.17.3

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

authMode : DeviceCode
cliAadAppId : hidden
cliAadAppTenant: common
cliEnvironment :
cliVersion : 3.13.0
nodeVersion : v14.17.3
os : {"platform":"win32","version":"Windows 10 Pro","release":"10.0.19043"}
roles : []
scopes : ["AllSites.FullControl","AppCatalog.ReadWrite.All","Directory.AccessAsUser.All","Directory.ReadWrite.All","Group.ReadWrite.All","IdentityProvider.ReadWrite.All","Mail.Send","Reports.Read.All","TermStore.ReadWrite.All","User.Invite.All","User.Read.All","profile","openid","email","AllSites.FullControl","AppCatalog.ReadWrite.All","Directory.AccessAsUser.All","Directory.ReadWrite.All","Group.ReadWrite.All","IdentityProvider.ReadWrite.All","Mail.Send","Reports.Read.All","TermStore.ReadWrite.All","User.Invite.All","User.Read.All","AllSites.FullControl","AppCatalog.ReadWrite.All","Directory.AccessAsUser.All","Directory.ReadWrite.All","Group.ReadWrite.All","IdentityProvider.ReadWrite.All","Mail.Send","Reports.Read.All","TermStore.ReadWrite.All","User.Invite.All","User.Read.All"]

Additional Info

From my perspective, the CLI should be able to remove the site if it doesn't find the Microsoft 365 Group (maybe it should at least check if it's in the deleted Groups first?).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions