Skip to content

Unable to delete/recycle a group-connected site #1707

@Tinathnath

Description

@Tinathnath

Category

  • Bug

Describe the bug

Hi !
I'm trying to recycle a group connected site collection with the method context.GetSiteCollectionManager().RecycleSiteCollectionAsync(siteUri). The API calls always end up with a http 500 error : SharePoint Rest service exception with no further details.

I first thought it would be a permission related issue, but I ended up giving every possible permission to my app, including the "Sharepoint administrator" and "Group administrator" roles, and I still get the error. I'm using app-only authentication with a certificate.

Do you know if the endpoint has a issue for now ? Or I'm a doing something wrong ?

Steps to reproduce

  1. Create a context with app only authentication (client ID + certificate)
  2. Get the admin context
  3. Try to delete a site with context.GetSiteCollectionManager().RecycleSiteCollectionAsync(siteUri)
  4. See the error

Failing API call : POST https://mytenant-admin.sharepoint.com/_api/GroupSiteManager/Delete?siteUrl='https://mytenan.sharepoint.com/sites/hh'

Expected behavior

Site deletion successfull.

Environment details (development & target environment)

  • SDK version: 1.15.0
  • OS: Windows (Azure App Service)
  • SDK used in: ASP.net API
  • Framework: .NET Core 8
  • Browser(s): n/a
  • Tooling: Visual Studio 2022, Postman
  • Additional details: n/a

Thanks for your help !
Best,

Thanks for your contribution! Sharing is caring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions