pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
988 stars 665 forks source link

Get-PnPTenantSite & Get-PnPSite - Return Zeros for GroupId #2469

Open robertcaretta opened 4 years ago

robertcaretta commented 4 years ago

Reporting an Issue

1) Get-PnPTenantSite -> returns zeros for GroupId 2) Get-PnPSite -> returns zeros for GroupId 3) Get-PnPSite -Identity "" -> This returns the GroupId properly.

Expected behavior

I expect to be able to retrieve the group IDs in bulk using either of the commands from #1 or #2.

Actual behavior

GroupId is returned as 00000000-0000-0000-0000-000000000000 for all records.

Steps to reproduce behavior

Run the commands listed above

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

3.16.1912.0

How did you install the PnP-PowerShell Cmdlets?

ghost commented 4 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

Jenny-Neal commented 4 years ago

I'm having the same issue, is there any work arounds to find the id of a group connected to a site please?

Patrick959 commented 4 years ago

Running Get-PnPTenantSite -Url $Url will return the Group ID. No ideal when you are parsing 12k site collections

robertcaretta commented 4 years ago

That may be the case now. At the time when this ticket was opened it was returning all 0's

Patrick959 commented 4 years ago

Getting all the sites is still broken, returns all 0's

valpvt commented 4 years ago

The issue is still there with version 3.23.2007.1, any plan to fix this anytime soon?

wilecoyotegenius commented 4 years ago

Try using RelatedGroupId property instead of GroupId. Works perfectly in my environment with PnP version 3.23.2007.1

valpvt commented 4 years ago

@wilecoyotegenius What command do you use to get the actual value of the group id please? I use "Get-PnPTenantSite -Detailed" and both GroupId and RelatedGroupId are always set with 0

wilecoyotegenius commented 4 years ago

@vAlp3R I use $site = Get-PnPSite -Includes RelatedGroupId and then $site.RelatedGroupId is correctly populated with Group ID

robertcaretta commented 4 years ago

Thank you for the idea. I will try that next time.

I still think there is something wrong with these cmdlets though. Especially Get-PnPTenantSite. That one is definitely not working as expected. One of my use cases is to be able to dump a report out of all site collections.

On Thu, Jul 30, 2020 at 8:49 AM wilecoyotegenius notifications@github.com wrote:

@vAlp3R https://github.com/vAlp3R I use $site = Get-PnPSite -Includes RelatedGroupId and then $site.RelatedGroupId is correctly populated with Group ID

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pnp/PnP-PowerShell/issues/2469#issuecomment-666376438, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMJ2HLN4HQIH2V7LKPWW23R6F3ANANCNFSM4KK4O6KQ .

svermaak commented 3 years ago

I am unable to get group id with either GroupId or RelatedGroupId in v3.25.2009.1 for a site created with New-PNPTenantSite