Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DmarcQuarantineAction and DmarcRejectAction on EXOAntiPhishPolicy #5072

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ function Get-TargetResource
[System.String]
$TargetedUserQuarantineTag,

[Parameter()]
[System.String]
[ValidateSet('MoveToJmf', 'Quarantine')]
$DmarcQuarantineAction,

[Parameter()]
[System.String]
[ValidateSet('Quarantine', 'Reject')]
$DmarcRejectAction,

[Parameter()]
[System.Management.Automation.PSCredential]
$Credential,
Expand Down Expand Up @@ -277,6 +287,8 @@ function Get-TargetResource
TargetedUserProtectionAction = $TargetedUserProtectionActionValue
TargetedUsersToProtect = $AntiPhishPolicy.TargetedUsersToProtect
TargetedUserQuarantineTag = $AntiPhishPolicy.TargetedUserQuarantineTag
DmarcQuarantineAction = $AntiPhishPolicy.DmarcQuarantineAction
DmarcRejectAction = $AntiPhishPolicy.DmarcRejectAction
Credential = $Credential
Ensure = 'Present'
ApplicationId = $ApplicationId
Expand Down Expand Up @@ -457,6 +469,16 @@ function Set-TargetResource
[System.String]
$TargetedUserQuarantineTag,

[Parameter()]
[System.String]
[ValidateSet('MoveToJmf', 'Quarantine')]
$DmarcQuarantineAction,

[Parameter()]
[System.String]
[ValidateSet('Quarantine', 'Reject')]
$DmarcRejectAction,

[Parameter()]
[System.Management.Automation.PSCredential]
$Credential,
Expand Down Expand Up @@ -694,6 +716,16 @@ function Test-TargetResource
[System.String]
$TargetedUserQuarantineTag,

[Parameter()]
[System.String]
[ValidateSet('MoveToJmf', 'Quarantine')]
$DmarcQuarantineAction,

[Parameter()]
[System.String]
[ValidateSet('Quarantine', 'Reject')]
$DmarcRejectAction,

[Parameter()]
[System.Management.Automation.PSCredential]
$Credential,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class MSFT_EXOAntiPhishPolicy : OMI_BaseResource
[Write, Description("The TargetedUserActionRecipients parameter specifies the replacement or additional recipients for detected user impersonation messages when the TargetedUserProtectionAction parameter is set to the value Redirect or BccMessage. A valid value for this parameter is an email address. You can specify multiple email addresses separated by commas.")] String TargetedUserActionRecipients[];
[Write, Description("The TargetedUsersToProtect parameter specifies the users that are included in user impersonation protection when the EnableTargetedUserProtection parameter is set to $true.")] String TargetedUsersToProtect[];
[Write, Description("The TargetedUserQuarantineTag specifies the quarantine policy that's used on messages that are quarantined by user impersonation protection.")] String TargetedUserQuarantineTag;
[Write, Description("The DmarcQuarantineAction parameter specifies the action to take when a message fails DMARC checks and the sender's DMARC policy is p=quarantine"), ValueMap{"MoveToJmf","Quarantine"}, Values{"MoveToJmf","Quarantine"}] String DmarcQuarantineAction;
[Write, Description("The DmarcRejectAction parameter specifies the action to take when a message fails DMARC checks and the sender's DMARC policy is p=reject."), ValueMap{"Quarantine","Reject"}, Values{"Quarantine","Reject"}] String DmarcRejectAction;
[Write, Description("Credentials of the Exchange Global Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
[Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Configuration Example
EnableUnusualCharactersSafetyTips = $null
TargetedUserActionRecipients = $null
Ensure = "Present"
DmarcQuarantineAction = "Quarantine"
DmarcRejectAction = "Reject"
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Configuration Example
EnableUnusualCharactersSafetyTips = $null
TargetedUserActionRecipients = $null
Ensure = "Present"
DmarcQuarantineAction = "Quarantine"
DmarcRejectAction = "Reject"
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Configuration Example
EnableOrganizationDomainsProtection = $null
EnableUnusualCharactersSafetyTips = $null
TargetedUserActionRecipients = $null
DmarcQuarantineAction = "Quarantine"
DmarcRejectAction = "Reject"
Ensure = "Present"
ApplicationId = $ApplicationId
TenantId = $TenantId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@
EnableOrganizationDomainsProtection = $null
EnableUnusualCharactersSafetyTips = $null
TargetedUserActionRecipients = $null
DmarcQuarantineAction = "Quarantine"
DmarcRejectAction = "Reject"
Ensure = "Present"
ApplicationId = $ApplicationId
TenantId = $TenantId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
EnableOrganizationDomainsProtection = $null
EnableUnusualCharactersSafetyTips = $null
TargetedUserActionRecipients = $null
DmarcQuarantineAction = "Quarantine"
DmarcRejectAction = "Reject"
Ensure = "Present"
ApplicationId = $ApplicationId
TenantId = $TenantId
Expand Down Expand Up @@ -469,7 +471,7 @@
}
EXORecipientPermission 'AddSendAs'
{

Identity = 'AdeleV@$Domain'
Trustee = "admin@$TenantId"
Ensure = 'Absent'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@
EnableOrganizationDomainsProtection = $null
EnableUnusualCharactersSafetyTips = $null
TargetedUserActionRecipients = $null
DmarcQuarantineAction = "Quarantine"
DmarcRejectAction = "Reject"
Ensure = "Present"
ApplicationId = $ApplicationId
TenantId = $TenantId
Expand Down
Loading