Skip to content

Commit efb70f8

Browse files
added #4864
1 parent 5b14758 commit efb70f8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Modules/CIPPCore/Public/New-CIPPGroup.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,15 @@ function New-CIPPGroup {
167167
GroupType = $NormalizedGroupType
168168
Email = if ($NeedsEmail) { $Email } else { $null }
169169
}
170-
170+
if ($GroupObject.subscribeMembers) {
171+
#Waiting for group to become available in Exo.
172+
Start-Sleep -Seconds 10
173+
$SubParams = @{
174+
Identity = $GraphRequest.id
175+
'autoSubscribeNewMembers' = $true
176+
}
177+
$null = New-ExoRequest -tenantid $TenantFilter -cmdlet 'Set-UnifiedGroup' -cmdParams $SubParams
178+
}
171179
} else {
172180
# Handle Exchange Online groups (Distribution, DynamicDistribution)
173181

0 commit comments

Comments
 (0)