Skip to content

Commit 13c0523

Browse files
expand groups
1 parent 41cb7f9 commit 13c0523

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Modules/CIPPCore/Public/Functions/Get-CIPPTenantAlignment.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,13 @@ function Get-CIPPTenantAlignment {
101101

102102
if ($Template.tenantFilter -and $Template.tenantFilter.Count -gt 0) {
103103
# Extract tenant values from the tenantFilter array
104-
$TenantValues = $Template.tenantFilter | ForEach-Object { $_.value }
104+
$TenantValues = $Template.tenantFilter | ForEach-Object {
105+
if ($_.type -eq 'group') {
106+
(Get-TenantGroups -GroupId $_.value).members.defaultDomainName
107+
} else {
108+
$_.value
109+
}
110+
}
105111

106112
if ($TenantValues -contains 'AllTenants') {
107113
$AppliestoAllTenants = $true

0 commit comments

Comments
 (0)