Skip to content

Commit

Permalink
Merge pull request KelvinTegelaar#486 from KelvinTegelaar/dev
Browse files Browse the repository at this point in the history
Dev to hotfix
  • Loading branch information
KelvinTegelaar authored Nov 20, 2023
2 parents 95be57e + d057aad commit 3ac2384
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Modules/CIPPCore/Public/Invoke-CIPPOffboardingJob.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ function Invoke-CIPPOffboardingJob {
}
{ $_."RemovePermissions" } {
if ($RunScheduled) {
Remove-CIPPMailboxPermissions #Finish this
Remove-CIPPMailboxPermissions -PermissionsLevel @("FullAccess", "SendAs", "SendOnBehalf") -userid "AllUsers" -AccessUser $UserName -TenantFilter $TenantFilter -APIName $APINAME -ExecutingUser $ExecutingUser

}
else {
$object = [PSCustomObject]@{
Expand Down
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 3ac2384

Please sign in to comment.