Skip to content

Commit 82c6a0f

Browse files
committed
Update Invoke-AddGroup.ps1
1 parent 9c8c46f commit 82c6a0f

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ Function Invoke-AddGroup {
3939
$BodyParams | Add-Member -NotePropertyName 'groupTypes' -NotePropertyValue @('Unified')
4040
}
4141
if ($GroupObject.owners -AND $GroupObject.groupType -in 'generic', 'azurerole', 'security') {
42-
$BodyParams | Add-Member -NotePropertyName '[email protected]' -NotePropertyValue (($GroupObject.AddOwner) | ForEach-Object { "https://graph.microsoft.com/v1.0/users/$($_.value)" })
42+
$BodyParams | Add-Member -NotePropertyName '[email protected]' -NotePropertyValue (($GroupObject.owners) | ForEach-Object { "https://graph.microsoft.com/v1.0/users/$($_.value)" })
4343
$BodyParams.'[email protected]' = @($BodyParams.'[email protected]')
4444
}
4545
if ($GroupObject.members -AND $GroupObject.groupType -in 'generic', 'azurerole', 'security') {
46-
$BodyParams | Add-Member -NotePropertyName '[email protected]' -NotePropertyValue (($GroupObject.AddMember) | ForEach-Object { "https://graph.microsoft.com/v1.0/users/$($_.value)" })
46+
$BodyParams | Add-Member -NotePropertyName '[email protected]' -NotePropertyValue (($GroupObject.members) | ForEach-Object { "https://graph.microsoft.com/v1.0/users/$($_.value)" })
4747
$BodyParams.'[email protected]' = @($BodyParams.'[email protected]')
4848
}
4949
$GraphRequest = New-GraphPostRequest -uri 'https://graph.microsoft.com/beta/groups' -tenantid $tenant -type POST -body (ConvertTo-Json -InputObject $BodyParams -Depth 10) -Verbose

0 commit comments

Comments
 (0)