Create contentApproval

Namespace: microsoft.graph.windowsUpdates

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.

Create a new contentApproval object.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) WindowsUpdates.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application WindowsUpdates.ReadWrite.All Not available.

For an app to read or write all Windows update deployment settings with delegated permissions, the signed-in user must be assigned the Global Administrator, Intune Administrator, or Windows Update Deployment Administrator Microsoft Entra roles.

HTTP request

POST /admin/windows/updates/updatePolicies/{updatePolicyId}/complianceChanges

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

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

You can specify the following properties when you create a contentApproval.

Property Type Description
content microsoft.graph.windowsUpdates.deployableContent Specifies what content to deploy. Deployable content should be provided as one of the following derived types: microsoft.graph.windowsUpdates.catalogContent.
deploymentSettings microsoft.graph.windowsUpdates.deploymentSettings Settings for governing how to deploy content.

Response

If successful, this method returns a 200 OK response code and an updated microsoft.graph.windowsUpdates.contentApproval object in the response body.

Examples

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/admin/windows/updates/updatePolicies/a7aa99c1-34a2-850c-5223-7816fde70713/complianceChanges
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.windowsUpdates.contentApproval",
  "content": {
    "@odata.type": "#microsoft.graph.windowsUpdates.catalogContent",
    "catalogEntry": {
      "@odata.type": "#microsoft.graph.windowsUpdates.featureUpdateCatalogEntry", 
      "id": "6b7e60db-a8e4-426a-9aed-bd12b5c0b9d4"
    }
  },
  "deploymentSettings": {},
    "schedule": {
      "startDateTime": "String (timestamp)",
      "gradualRollout": {
        "@odata.type": "#microsoft.graph.windowsUpdates.dateDrivenRolloutSettings",
        "endDateTime": "String (timestamp)"
      }
   }
}

Response

The following example shows the response.

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

HTTP/1.1 201 Created
Content-Type: application/json

{
    "@odata.type": "#microsoft.graph.windowsUpdates.contentApproval",
    "id": "6b73d038-68bc-4f0b-8b94-72a26f1e879d",
    "createdDateTime": "String (timestamp)",
    "isRevoked": false,
    "revokedDateTime": "String (timestamp)",
    "content": {
        "@odata.type": "#microsoft.graph.windowsUpdates.catalogContent"
    },
    "deploymentSettings": {
        "schedule": null,
        "monitoring": null,
        "contentApplicability": null,
        "userExperience": null,
        "expedite": null
    }
}