Update adminConsentRequestPolicy

Namespace: microsoft.graph

Update the properties of an adminConsentRequestPolicy 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) Policy.ReadWrite.ConsentRequest, Directory.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Policy.ReadWrite.ConsentRequest, Directory.ReadWrite.All

When calling on behalf of a user, the user needs to belong to the Global Administrator directory role.

HTTP request

PUT /policies/adminConsentRequestPolicy

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 adminConsentRequestPolicy object.

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

Property Type Description
isEnabled Boolean Specifies whether the admin consent request feature is enabled or disabled.
notifyReviewers Boolean Specifies whether reviewers will receive notifications.
remindersEnabled Boolean Specifies whether reviewers will receive reminder emails.
requestDurationInDays Int32 Specifies the duration the request is active before it automatically expires if no decision is applied.
reviewers accessReviewReviewerScope collection The list of reviewers for the admin consent.

Response

If successful, this method returns a 204 No content response code and an updated adminConsentRequestPolicy object in the response body.

Examples

Request

PUT https://graph.microsoft.com/v1.0/policies/adminConsentRequestPolicy 
Content-Type: application/json

{
  "isEnabled": true,
  "notifyReviewers": true,
  "remindersEnabled": true,
  "requestDurationInDays": 5,
  "reviewers": [
    {
      "query": "/users/b6879be8-fb87-4482-a72e-18445d2b5c54",
      "queryType": "MicrosoftGraph"
    },
    {
      "query": "/users/b3427cc5-bf69-4dcd-95f7-ed1eb432f5e9",
      "queryType": "MicrosoftGraph"
    }
  ]
}

Response

HTTP/1.1 204 No Content
Content-Type: text/plain