Update Policy


APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

Update properties in a preexisting policy.


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) Directory.AccessAsUser.All
Delegated (personal Microsoft account) Not supported.
Application Not supported.

HTTP request

PATCH /policies/{id}

Request headers

Name Type Description
Authorization string Bearer {token}. Required.
Content-Type application/json Nature of the data in the body of an entity. Required.

Request body

In the request body, provide a JSON object with the parameters that need to be updated. The following table shows the possible parameters.

Parameter Type Description
definition String The stringified version of the policy object.
displayName String A custom name for the policy.
isOrganizationDefault Boolean Specifies if this policy is applied by default.
type String Specifies the type of policy. Currently must be "TokenLifetimePolicy"


If successful, this method returns 204 No Content response code. If unsuccessful, a 4xx error will be returned with specific details.


The following example updates the definition of the token lifetime policy and sets it as the organization default.


Here is an example of the request.

PATCH https://graph.microsoft.com/beta/policies/{id}
Content-Type: application/json

Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 204 No Content