File tree Expand file tree Collapse file tree
Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/Identity/Administration/Users Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ function Invoke-EditUser {
190190 Write-Host " About to add $ ( $UserObj.userPrincipalName ) to $GroupName . Group ID is: $GroupID and type is: $GroupType "
191191
192192 try {
193- if ($GroupType -eq ' Distribution list ' -or $GroupType -eq ' Mail-Enabled Security ' ) {
193+ if ($GroupType -eq ' distributionList ' -or $GroupType -eq ' security ' ) {
194194 Write-Host ' Adding to group via Add-DistributionGroupMember'
195195 $Params = @ { Identity = $GroupID ; Member = $UserObj.id ; BypassSecurityGroupManagerCheck = $true }
196196 $null = New-ExoRequest - tenantid $UserObj.tenantFilter - cmdlet ' Add-DistributionGroupMember' - cmdParams $params - UseSystemMailbox $true
@@ -222,7 +222,7 @@ function Invoke-EditUser {
222222 Write-Host " About to remove $ ( $UserObj.userPrincipalName ) from $GroupName . Group ID is: $GroupID and type is: $GroupType "
223223
224224 try {
225- if ($GroupType -eq ' Distribution list ' -or $GroupType -eq ' Mail-Enabled Security ' ) {
225+ if ($GroupType -eq ' distributionList ' -or $GroupType -eq ' security ' ) {
226226 Write-Host ' Removing From group via Remove-DistributionGroupMember'
227227 $Params = @ { Identity = $GroupID ; Member = $UserObj.id ; BypassSecurityGroupManagerCheck = $true }
228228 $null = New-ExoRequest - tenantid $UserObj.tenantFilter - cmdlet ' Remove-DistributionGroupMember' - cmdParams $params - UseSystemMailbox $true
You can’t perform that action at this time.
0 commit comments