Skip to content

Commit

Permalink
Merge of #1238. Thanks @valpvt
Browse files Browse the repository at this point in the history
  • Loading branch information
jansenbe committed Aug 17, 2023
2 parents 8c7d8b0 + f58757c commit 478d4a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed Graph paging for US Government, Germany and China clouds + removed some hardcoded references to graph.microsoft.com [jansenbe - Bert Jansen]
- Admin library: Group connected team sites use the Microsoft Graph api for both application and delegated permissions #1220 [danielpastoor - Daniel Pastoor]
- Added Poland to the `GeoLocation` enum #1232 [jansenbe - Bert Jansen]
- Fix issue to enumerate private/shared channel sites #1238 [valpvt]

## [1.10.0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal async static Task<List<ISiteCollection>> GetAsync(PnPContext context, V
}

/// <summary>
/// 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
/// </summary>
Expand Down Expand Up @@ -143,7 +143,7 @@ private async static Task LoadSitesViaTenantAdminHiddenListAsync(PnPContext cont
}

/// <summary>
/// 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
/// </summary>
Expand Down Expand Up @@ -195,7 +195,7 @@ await LoadSitesViaTenantAdminHiddenListAsync(context, sitesListAllQuery, (IEnume
<FieldRef Name='SiteOwnerName' />
<FieldRef Name='SiteOwnerEmail' />
<FieldRef Name='StorageQuota' />
<FieldRef Name='StorageUsed' />
<FieldRef Name='StorageUsed' />
<FieldRef Name='TemplateName' />
<FieldRef Name='ChannelType' />
</ViewFields>
Expand All @@ -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()
Expand Down Expand Up @@ -542,7 +542,7 @@ internal async static Task<List<ISiteCollection>> 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": [
Expand Down

0 comments on commit 478d4a4

Please sign in to comment.