Skip to content

Get-PnPAzureADGroup limiting groups returned #3074

@ronaldmavarez

Description

@ronaldmavarez

Get-PnPAzureADGroup does not return all AD groups

Description
The Get-PnPAzureADGroup cmdlet only returns the first 100 AD groups from Azure, regardless of the total number of groups available.

Steps to reproduce

  1. Run the following code in PowerShell:
$azureADGroups = Get-PnPAzureADGroup 
$azureADGroups.Count
  1. Observe that the count is always 100, even if there are more AD groups in Azure.

Expected behavior
The Get-PnPAzureADGroup cmdlet should return all AD groups from Azure

Versions
PnP.PowerShell 2.1.1

PSVersion 7.3.4
PSEdition Core
GitCommitId 7.3.4
OS Microsoft Windows 10.0.22621
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0


Discussed in #3070

Originally posted by londify April 28, 2023
Hi,

I upgraded from 1.2 to 2.1.1 and noticed that the Get-PnPAzureADGroup command is limiting the groups i get back to 100. Before I was getting 7k+. Anyone else experiencing this?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions