From f58757c157eb8fe505a4a78776b5469211549b61 Mon Sep 17 00:00:00 2001 From: valpvt Date: Tue, 25 Jul 2023 09:42:12 +0200 Subject: [PATCH] #1234 Fix issue to enumerate private/shared channel sites #1234 Fix issue to enumerate private/shared channel sites --- build/version.debug.increment | 2 +- .../Core/Internal/SiteCollectionEnumerator.cs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/version.debug.increment b/build/version.debug.increment index 6f4247a625..f64f5d8d85 100644 --- a/build/version.debug.increment +++ b/build/version.debug.increment @@ -1 +1 @@ -26 +27 diff --git a/src/sdk/PnP.Core.Admin/Model/SharePoint/Core/Internal/SiteCollectionEnumerator.cs b/src/sdk/PnP.Core.Admin/Model/SharePoint/Core/Internal/SiteCollectionEnumerator.cs index f0d947be14..e1f43abef0 100644 --- a/src/sdk/PnP.Core.Admin/Model/SharePoint/Core/Internal/SiteCollectionEnumerator.cs +++ b/src/sdk/PnP.Core.Admin/Model/SharePoint/Core/Internal/SiteCollectionEnumerator.cs @@ -35,7 +35,7 @@ internal async static Task> GetAsync(PnPContext context, V } /// - /// Enumerating site collections by querying a hidden list in SharePoint tenant admin. Only works when using + /// Enumerating site collections by querying a hidden list in SharePoint tenant admin. Only works when using /// application permissions with Sites.Read.All or higher or when the user has read access to SharePoint tenant admin, /// which is the case for global SharePoint administrators /// @@ -143,7 +143,7 @@ private async static Task LoadSitesViaTenantAdminHiddenListAsync(PnPContext cont } /// - /// Enumerating site collections by querying a hidden list in SharePoint tenant admin. Only works when using + /// Enumerating site collections by querying a hidden list in SharePoint tenant admin. Only works when using /// application permissions with Sites.Read.All or higher or when the user has read access to SharePoint tenant admin, /// which is the case for global SharePoint administrators /// @@ -195,7 +195,7 @@ await LoadSitesViaTenantAdminHiddenListAsync(context, sitesListAllQuery, (IEnume - + @@ -216,14 +216,14 @@ await LoadSitesViaTenantAdminHiddenListAsync(context, sitesListFilterQuery, (IEn { foreach (var listItem in listItems) { - if (listItem["DeletedBy"] != null) + if (listItem["TimeDeleted"] != null) { continue; } Uri url = new Uri(listItem["SiteUrl"].ToString()); Guid siteId = Guid.Parse(listItem["SiteId"].ToString()); - + if (channelSites.FirstOrDefault(p => p.Id == siteId) == null) { channelSites.Add(new SiteCollectionWithDetails() @@ -542,7 +542,7 @@ internal async static Task> GetViaGraphSitesApiAsync(PnPCo var result = await (context.Web as Web).RawRequestAsync(sitesEnumerationApiCall, HttpMethod.Get).ConfigureAwait(false); #region Json response - /* + /* "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites", "@odata.nextLink": "https://graph.microsoft.com/v1.0/sites?$skiptoken=UGFnZWQ9VFJVRSZwX0ZpbGVMZWFmUmVmPTE3MjgyXy4wMDAmcF9JRD0xNzI4Mg", "value": [