mailboxProtectionRule resource type
Namespace: microsoft.graph
Important
APIs under the /beta
version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Represents the properties of a protection rule associated with an Exchange protection policy.
Inherits from protectionRuleBase.
Methods
Method | Return type | Description |
---|---|---|
List | mailboxProtectionRule collection | Get a list of the mailboxProtectionRule objects and their properties. |
Create | mailboxProtectionRule | Create a new mailboxProtectionRule. |
Get | mailboxProtectionRule | Read the properties and relationships of a mailboxProtectionRule. |
Update | mailboxProtectionRule | Update the properties of a mailboxProtectionRule object. |
Delete | None | Delete a mailboxProtectionRule. |
Delete and unprotect | mailboxProtectionRule | Delete and unprotect all the artifacts protected by a dynamic rule. |
Run | protectionRuleBase | Activate a mailbox protection rule. |
Properties
Property | Type | Description |
---|---|---|
id | String | The unique identifier of the protection rule associated with the policy. |
createdBy | identitySet | The identity of the person who created the rule. |
createdDateTime | DateTimeOffset | The date and time that the rule was created. |
error | publicError | Contains error details if an operation on a rule expression fails. |
isAutoApplyEnabled | Boolean | true indicates that the protection rule is dynamic; false that it's static. Static rules run one time while dynamic rules listen to all changes in the system and update the protection unit list. Currently, only static rules are supported. |
lastModifiedBy | identitySet | Identity of the person who last modified this rule. |
lastModifiedDateTime | DateTimeOffset | Timestamp of last modification to the rule. |
mailboxExpression | String | Contains a mailbox expression. For examples, see mailboxExpression examples. |
status | protectionRuleStatus | The status of the protection rule. The possible values are: draft , active , completed , completedWithErrors , unknownFutureValue , updateRequested , deleteRequested . Use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: updateRequested , deleteRequested . The draft member is currently unsupported. Inherited from protectionRuleBase. |
mailboxExpression examples
The following table shows the possible formats for the mailbox expression.
Property | Operator | Example |
---|---|---|
memberOf |
-any |
(memberOf -any (group.id -in ['d7f5150a-0c6f-4894-a6a1-6df77b26f375'])) |
group.id |
-in |
(memberOf -any (group.id -in ['d7f5150a-0c6f-4894-a6a1-6df77b26f375', '363cdbd0-f091-4644-93e4-64c1020c94d8'])) |
Relationships
None.
JSON representation
The following JSON representation shows the resource type.
{
"@odata.type": "#microsoft.graph.mailboxProtectionRule",
"id": "String (identifier)",
"status": "String",
"createdDateTime": "String (timestamp)",
"createdBy": {
"@odata.type": "microsoft.graph.identitySet"
},
"lastModifiedDateTime": "String (timestamp)",
"lastModifiedBy": {
"@odata.type": "microsoft.graph.identitySet"
},
"error": {
"@odata.type": "microsoft.graph.publicError"
},
"isAutoApplyEnabled": "Boolean",
"mailboxExpression": "String"
}