Skip to content

quarantinePolicies

Quarantine Policies. Control end-user quarantine permissions and notifications. The quarantinePolicies entity set lives under /exchange/v1.0/quarantinePolicies in the Threat protection category.

Fact Value
Path /exchange/v1.0/quarantinePolicies
Category Threat protection
Tier Tier 4, Threat protection
Read role ThreatPolicy.Read.All (Community)
Write role ThreatPolicy.ReadWrite.All (Enterprise)
Backing cmdlets Get-QuarantinePolicy, Set-QuarantinePolicy, New-QuarantinePolicy, Remove-QuarantinePolicy
Method Path Synopsis Role Plan
GET /exchange/v1.0/quarantinePolicies List quarantinePolicies entries. ThreatPolicy.Read Community
POST /exchange/v1.0/quarantinePolicies Create a new quarantinePolicies entry via New-QuarantinePolicy. Required: name. Returns 201 + Location + the freshly-fetched policy. ThreatPolicy.ReadWrite Enterprise
GET /exchange/v1.0/quarantinePolicies/{key} Get a single quarantinePolicies entry by Identity. ThreatPolicy.Read Community
PATCH /exchange/v1.0/quarantinePolicies/{key} Partial update via Set-QuarantinePolicy. Returns 200 + the post-Set policy. ThreatPolicy.ReadWrite Enterprise
DELETE /exchange/v1.0/quarantinePolicies/{key} Remove the quarantinePolicies at /{key}. Returns 204. ThreatPolicy.ReadWrite Enterprise

List quarantinePolicies entries.

Backing cmdlet: Get-QuarantinePolicy. Role: ThreatPolicy.Read (Community).

Parameter In Type Required Description
quarantinePolicyType query string Server-side filter by quarantine policy type. One of: QuarantinePolicy | GlobalQuarantinePolicy.

Create a new quarantinePolicies entry via New-QuarantinePolicy. Required: name. Returns 201 + Location + the freshly-fetched policy.

Backing cmdlet: New-QuarantinePolicy. Role: ThreatPolicy.ReadWrite (Enterprise).

Parameter In Type Required Description
name body yes
adminDisplayName body
adminNotificationFrequencyInDays body
adminNotificationLanguage body
adminNotificationsEnabled body
adminQuarantinePermissionsList body
customDisclaimer body
endUserQuarantinePermissions body
endUserQuarantinePermissionsValue body
endUserSpamNotificationCustomFromAddress body
endUserSpamNotificationFrequency body
endUserSpamNotificationFrequencyInDays body
endUserSpamNotificationLanguage body
esnCustomSubject body
esnEnabled body
includeMessagesFromBlockedSenderAddress body
multiLanguageCustomDisclaimer body
multiLanguageSenderName body
multiLanguageSetting body
organizationBrandingEnabled body
quarantinePolicyType body
quarantineRetentionDays body
dryRun query bool (switch)

Create an end-user quarantine release policy

Section titled “Create an end-user quarantine release policy”

Create a new Defender quarantine policy via New-QuarantinePolicy. Required: name. The policy controls what end-users can do with quarantined messages (preview, release, block sender) and how/when end-user spam notifications are sent. Apply the new policy to recipient mailboxes via a HostedContentFilterRule or per-feature quarantine policy reference.

POST /exchange/v1.0/quarantinePolicies HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "Finance-Strict-Release-Policy",
"endUserQuarantinePermissionsValue": 27,
"ESNEnabled": true,
"endUserSpamNotificationFrequencyInDays": 1,
"endUserSpamNotificationLanguage": "Default",
"includeMessagesFromBlockedSenderAddress": false,
"organizationBrandingEnabled": true,
"quarantineRetentionDays": 30
}
HTTP/1.1 201 Created
Location: /exchange/v1.0/quarantinePolicies/Finance-Strict-Release-Policy
{
"@odata.context": "https://api.contoso.com/exchange/v1.0/$metadata#quarantinePolicies/$entity",
"Id": "Finance-Strict-Release-Policy",
"Name": "Finance-Strict-Release-Policy",
"Identity": "Finance-Strict-Release-Policy",
"EndUserQuarantinePermissionsValue": "27",
"EsnEnabled": true,
"AdminNotificationLanguage": []
}

Related: GET /exchange/v1.0/quarantinePolicies, PATCH /exchange/v1.0/quarantinePolicies/{key}, DELETE /exchange/v1.0/quarantinePolicies/{key}

GET /exchange/v1.0/quarantinePolicies/{key}

Section titled “GET /exchange/v1.0/quarantinePolicies/{key}”

Get a single quarantinePolicies entry by Identity.

Backing cmdlet: Get-QuarantinePolicy. Role: ThreatPolicy.Read (Community).

PATCH /exchange/v1.0/quarantinePolicies/{key}

Section titled “PATCH /exchange/v1.0/quarantinePolicies/{key}”

Partial update via Set-QuarantinePolicy. Returns 200 + the post-Set policy.

Backing cmdlet: Set-QuarantinePolicy. Role: ThreatPolicy.ReadWrite (Enterprise).

Parameter In Type Required Description
adminNotificationFrequencyInDays body
adminNotificationLanguage body
adminNotificationsEnabled body
adminQuarantinePermissionsList body
customDisclaimer body
endUserQuarantinePermissions body
endUserQuarantinePermissionsValue body
endUserSpamNotificationCustomFromAddress body
endUserSpamNotificationFrequency body
endUserSpamNotificationFrequencyInDays body
endUserSpamNotificationLanguage body
esnCustomSubject body
esnEnabled body
includeMessagesFromBlockedSenderAddress body
multiLanguageCustomDisclaimer body
multiLanguageSenderName body
multiLanguageSetting body
organizationBrandingEnabled body
quarantineRetentionDays body
dryRun query bool (switch)

Partially updates an end-user quarantine release policy via Set-QuarantinePolicy. Only the supplied fields are changed; the post-Set policy is returned.

PATCH /exchange/v1.0/quarantinePolicies/{key} HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
{
"endUserSpamNotificationFrequencyInDays": 3,
"esnEnabled": true,
"quarantineRetentionDays": 30
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"Identity": "exonaut-sample-quarantinePolicies",
"Name": "exonaut-sample-quarantinePolicies",
"EndUserSpamNotificationFrequencyInDays": 3,
"ESNEnabled": true,
"QuarantineRetentionDays": 30
}

Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.

Related: GET /exchange/v1.0/quarantinePolicies

DELETE /exchange/v1.0/quarantinePolicies/{key}

Section titled “DELETE /exchange/v1.0/quarantinePolicies/{key}”

Remove the quarantinePolicies at /{key}. Returns 204.

Backing cmdlet: Remove-QuarantinePolicy. Role: ThreatPolicy.ReadWrite (Enterprise).

Parameter In Type Required Description
dryRun query bool (switch)

Removes an end-user quarantine release policy via Remove-QuarantinePolicy. Returns 204 No Content on success.

DELETE /exchange/v1.0/quarantinePolicies/{key} HTTP/1.1
Authorization: Bearer {token}
Content-Type: application/json
HTTP/1.1 204 No Content

Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.

Related: GET /exchange/v1.0/quarantinePolicies

?dryRun=true previews of any write stay on Community.