Skip to content

Commit db2436b

Browse files
committed
fix: compliance center anchor
1 parent 8917683 commit db2436b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Modules/CIPPCore/Public/GraphHelper/New-ExoRequest.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ function New-ExoRequest {
6666
if ($cmdlet -in 'Set-AdminAuditLogConfig') {
6767
$MailboxGuid = '8cc370d3-822a-4ab8-a926-bb94bd0641a9'
6868
}
69-
$anchor = "APP:SystemMailbox{$MailboxGuid}@$($tenant.customerId)"
69+
if ($Compliance.IsPresent) {
70+
$Anchor = "UPN:SystemMailbox{$MailboxGuid}@$($tenant.initialDomainName)"
71+
} else {
72+
$anchor = "APP:SystemMailbox{$MailboxGuid}@$($tenant.customerId)"
73+
}
7074
}
7175
#if the anchor is a GUID, try looking up the user.
7276
if ($Anchor -match '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$') {

0 commit comments

Comments
 (0)