Skip to content

Commit 5c84a00

Browse files
committed
Update Invoke-ExecExchangeRoleRepair.ps1
1 parent 360e058 commit 5c84a00

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecExchangeRoleRepair.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,14 @@ function Invoke-ExecExchangeRoleRepair {
2828
Write-Information "Found $($AvailableRoles.Count) available Organization Management roles in Exchange"
2929
$MissingOrgMgmtRoles = $AvailableRoles | Where-Object { $OrgManagementRoles.Role -notcontains $_.displayName }
3030

31-
$Group = New-ExoRequest -tenantid $Tenant.customerId -cmdlet 'Get-RoleGroup' -cmdParams @{ Identity = 'Organization Management' }
32-
3331
if ($MissingOrgMgmtRoles.Count -gt 0) {
3432
$Requests = foreach ($Role in $MissingOrgMgmtRoles) {
3533
[PSCustomObject]@{
3634
id = $Role.id
3735
method = 'POST'
3836
url = 'roleManagement/exchange/roleAssignments'
3937
body = @{
40-
principalId = $Group.ExternalDirectoryObjectId
38+
principalId = '/RoleGroups/Organization Management'
4139
roleDefinitionId = $Role.id
4240
directoryScopeId = '/'
4341
appScopeId = $null

0 commit comments

Comments
 (0)