Skip to content

Commit e05affb

Browse files
committed
Return sorted tenant groups
1 parent 875df46 commit e05affb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ListTenantGroups.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ function Invoke-ListTenantGroups {
1212

1313
$groupFilter = $Request.Query.groupId ?? $Request.Body.groupId
1414
$TenantGroups = (Get-TenantGroups -GroupId $groupFilter) ?? @()
15-
$Body = @{ Results = @($TenantGroups) }
15+
$SortedTenantGroups = $TenantGroups | Sort-Object Name
16+
$Body = @{ Results = @($SortedTenantGroups) }
1617

1718
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
1819
StatusCode = [HttpStatusCode]::OK

0 commit comments

Comments
 (0)