Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed issue with `Add-PnPNavigationNode` cmdlet where the target audience would not correctly be set when creating a node as a child of a parent node [#2940](https://github.com/pnp/powershell/pull/2940)
- Fixed regressions within the following cmdlets `Get-PnPTenantCdnEnabled`, `Get-PnPTenantCdnOrigin`, `Get-PnPTenantCdnPolicies`, `Get-PnPTenantDeletedSite`, `Get-PnPTenantInstance` [#3030](https://github.com/pnp/powershell/pull/3030)
- Fixed issue where `Add-PnPSiteCollectionAdmin -PrimarySiteCollectionAdmin <user>` would require owners to be specified as well. [#3035](https://github.com/pnp/powershell/pull/3035)
- Fixed `Get-PnPAzureADGroup` returns only 100 results even if there are more groups present in Azure AD. [#3085](https://github.com/pnp/powershell/pull/3085)

### Removed

Expand Down
9 changes: 2 additions & 7 deletions src/Commands/Utilities/AzureADGroupsUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,8 @@ internal static async Task<Group> GetGroupAsync(PnPConnection connection, string

internal static async Task<IEnumerable<Group>> GetGroupsAsync(PnPConnection connection, string accessToken)
{
var results = await GraphHelper.GetAsync<RestResultCollection<Group>>(connection, $"v1.0/groups", accessToken, propertyNameCaseInsensitive: true);

if (results != null && results.Items.Any())
{
return results.Items;
}
return null;
var results = await GraphHelper.GetResultCollectionAsync<Group>(connection, $"v1.0/groups", accessToken, propertyNameCaseInsensitive: true);
return results;
}

internal static async Task<Group> UpdateAsync(PnPConnection connection, string accessToken, Group group)
Expand Down