pnpcore icon indicating copy to clipboard operation
pnpcore copied to clipboard

Retrieve GroupId from

Open plamber opened this issue 2 years ago • 2 comments

Category

  • [x] Domain model extension

Describe the domain model extension

Would it be possible to extend the ISiteCollectionWithDetails object with additional properties? One that I am looking for is the GroupId to identify site collections that have a group id associated. I am sure there are other properties that could be interesting.

https://github.com/pnp/pnpcore/blob/3305cb42eb3534e9fb1f2dbaf52d3bf3da6636f9/src/sdk/PnP.Core.Admin/Model/SharePoint/Core/Internal/SiteCollectionEnumerator.cs#L187

Is it ok to extend these methods or should we query the tables directly?

Thank you for your feedback, Patrick

plamber avatar Jun 26 '23 12:06 plamber

@plamber : you can add more properties for ISiteCollectionWithDetails but keep in mind that underlying we're querying 2 hidden lists in tenant admin (see https://github.com/pnp/pnpcore/blob/dev/src/sdk/PnP.Core.Admin/Model/SharePoint/Core/Internal/SiteCollectionEnumerator.cs#L90-L143). The added properties should be available in both lists as otherwise the resulting output will not be complete.

Alternative approach, but did not research this, can be https://github.com/pnp/pnpcore/issues/1113

jansenbe avatar Jun 26 '23 15:06 jansenbe

Hello, I wanted to share my initial excitement when I came across the information, but unfortunately, the list DO_NOT_DELETE_SPLIST_TENANTADMIN_ALL_SITES_AGGREGATED_SITECOLLECTIONS does not provide the desired GroupId output.

In light of this situation, I believe it would be beneficial for us to investigate issue #1113 and consider maintaining the current endpoints unchanged. @MathijsVerbeeck, I was wondering if you have any valuable insights regarding the progress made on this matter?

Cheers

plamber avatar Jun 27 '23 09:06 plamber