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

PnPContext GetSiteCollectionManager().GetSiteCollectionsWithDetailsAsync(null, true) throwing exception #1234

Closed
1 task done
valpvt opened this issue Jul 21, 2023 · 2 comments
Assignees
Labels
area:admin 📜 Admin library related

Comments

@valpvt
Copy link
Contributor

valpvt commented Jul 21, 2023

Category

  • Bug

Describe the bug

While using PnpContext GetSiteCollectionManager().GetSiteCollectionsWithDetailsAsync(null, true) the method is throwing an exception because a site collection is not retrieved (returned 404). This happens for deleted private channel sites (still in the recycle bin) because sites are still present in the SP hidden list used by the method

Steps to reproduce

Use GetSiteCollectionManager().GetSiteCollectionsWithDetailsAsync(null, true) after private channel sites were deleted

Expected behavior

This method should not return an exception for these deleted sites and simply ignore them.

Environment details (development & target environment)

DELETE THIS LINE BEFORE SUBMITTING - Complete the following (if ignored you'll be prompted for it before we can address your issue... save the time and provide it in your initial submission).

  • SDK version: 1.10.0
  • OS: W10
  • SDK used in: Console App
  • Framework: .NET 6.0
  • Tooling: VS Code

Additional context

When you permanently delete the site form the recycle bin it solves the issue.
This issue is not present when using Get-PnpTenantSite -Detailed in PnP.PowerShell

Thanks for your contribution! Sharing is caring.

valpvt added a commit to valpvt/pnpcore that referenced this issue Jul 25, 2023
pnp#1234 Fix issue to enumerate private/shared channel sites
@jansenbe
Copy link
Contributor

Thanks for the issue and associated PR @valpvt ! I'll have a look.

@jansenbe jansenbe self-assigned this Aug 17, 2023
@jansenbe jansenbe added the area:admin 📜 Admin library related label Aug 17, 2023
@jansenbe
Copy link
Contributor

jansenbe commented Aug 17, 2023

@valpvt : merged your fix, thanks for the contribution! Change will appear in the next nightly, closing this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:admin 📜 Admin library related
Projects
None yet
Development

No branches or pull requests

2 participants