Skip to content

Commit 611f741

Browse files
committed
fix add group members/owners
1 parent 52cde90 commit 611f741

File tree

1 file changed

+7
-0
lines changed
  • Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Groups

1 file changed

+7
-0
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Groups/Invoke-AddGroup.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,16 @@ Function Invoke-AddGroup {
6464
Type = $GroupObject.groupType
6565
RequireSenderAuthenticationEnabled = [bool]!$GroupObject.allowExternal
6666
}
67+
if ($GroupObject.owners) {
68+
$ExoParams.ManagedBy = @($GroupObject.owners.value)
69+
}
70+
if ($GroupObject.members) {
71+
$ExoParams.Members = @($GroupObject.members.value)
72+
}
6773
$GraphRequest = New-ExoRequest -tenantid $tenant -cmdlet 'New-DistributionGroup' -cmdParams $ExoParams
6874
}
6975
}
76+
7077
"Successfully created group $($GroupObject.displayName) for $($tenant)"
7178
Write-LogMessage -headers $Request.Headers -API $APIName -tenant $tenant -message "Created group $($GroupObject.displayName) with id $($GraphRequest.id)" -Sev Info
7279

0 commit comments

Comments
 (0)