Skip to content

Commit

Permalink
fixes removal bug
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Nov 20, 2023
1 parent 3bc50da commit d057aad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Modules/CIPPCore/Public/Remove-CIPPMailboxPermissions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ function Remove-CIPPMailboxPermissions {
if ($userid -eq "AllUsers") {
$Mailboxes = New-ExoRequest -tenantid $TenantFilter -cmdlet "get-mailbox"
$Mailboxes | ForEach-Object -Parallel {
Import-Module ".\Modules\CIPPCore"
import-module ".\GraphHelper.psm1"
Import-Module ".\Modules\AzBobbyTables"
Write-Host "Removing permissions from mailbox $($_.UserPrincipalName)"
Remove-CIPPMailboxPermissions -PermissionsLevel @("FullAccess", "SendAs", "SendOnBehalf") -userid $_.UserPrincipalName -AccessUser $using:AccessUser -TenantFilter $using:TenantFilter -APIName $using:APINAME -ExecutingUser $using:ExecutingUser
} -ThrottleLimit 10
}
Expand Down
2 changes: 1 addition & 1 deletion version_latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.6.0
4.6.1

0 comments on commit d057aad

Please sign in to comment.