Update unifiedRoleManagementPolicyRule

Namespace: microsoft.graph

Update the properties of an unifiedRoleManagementPolicyRule object.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) RoleManagementPolicy.ReadWrite.Directory, RoleManagement.ReadWrite.Directory
Delegated (personal Microsoft account) Not supported
Application Not supported

HTTP request

PATCH /policies/roleManagementPolicies/{unifiedRoleManagementPolicyId}/rules/{unifiedRoleManagementPolicyRuleId}
PATCH /policies/roleManagementPolicies/{unifiedRoleManagementPolicyId}/effectiveRules/{unifiedRoleManagementPolicyRuleId}

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the unifiedRoleManagementPolicyRule object.

The following table shows the properties that are required when you update the unifiedRoleManagementPolicyRule.

Property Type Description
id String Unique identifier for the rule.
target unifiedRoleManagementPolicyRuleTarget The target for the policy rule.

Response

If successful, this method returns a 200 OK response code and an updated unifiedRoleManagementPolicyRule object in the response body.

Examples

Request

PATCH https://graph.microsoft.com/beta/policies/roleManagementPolicies/{unifiedRoleManagementPolicyId}/rules/{unifiedRoleManagementPolicyRuleId}
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.unifiedRoleManagementPolicyApprovalRule",
  "target": {
    "@odata.type": "microsoft.graph.unifiedRoleManagementPolicyRuleTarget"
  }
}

Response

Note: The response object shown here might be shortened for readability.

HTTP/1.1 204 OK