Create deployment

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.

Create a new deployment 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) WindowsUpdates.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application WindowsUpdates.ReadWrite.All

HTTP request

POST /admin/windows/updates/deployments

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

The following table shows the properties that are required when you create the deployment.

Property Type Description
audience microsoft.graph.windowsUpdates.deploymentAudience Specifies the audience to target.
content microsoft.graph.windowsUpdates.deployableContent Specifies what content to deploy. Deployable content should be provided as one of the following derived types: catalogContent.

Response

If successful, this method returns a 201 Created response code and a deployment object in the response body.

Example

Request

POST https://graph.microsoft.com/beta/admin/windows/updates/deployments
Content-Type: application/json

{
    "@odata.type": "#microsoft.graph.windowsUpdates.deployment",
    "content": {
        "@odata.type": "#microsoft.graph.windowsUpdates.catalogContent",
        "catalogEntry": {
            "@odata.type": "#microsoft.graph.windowsUpdates.featureUpdateCatalogEntry",
            "id": "f341705b-0b15-4ce3-aaf2-6a1681d78606"
        }
    },
    "settings": {
        "@odata.type": "microsoft.graph.windowsUpdates.deploymentSettings",
        "schedule": {
            "gradualRollout": {
                "@odata.type": "#microsoft.graph.windowsUpdates.rateDrivenRolloutSettings",
                "durationBetweenOffers": "P7D",
                "devicePerOffer": 100
            }
        },
        "monitoring": {
            "monitoringRules": [
                {
                    "signal": "rollback",
                    "threshold": 5,
                    "action": "pauseDeployment"
                }
            ]
        }
    }
}

Response

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

{
  "@odata.type": "#microsoft.graph.windowsUpdates.deployment",
  "id": "b5171742-1742-b517-4217-17b5421717b5",
  "createdDateTime": "2023-01-26T05:08:38.118213Z",
  "lastModifiedDateTime": "2023-01-26T05:08:38Z",
  "state": {
    "value": "offering",
    "reasons": [],
    "requestedValue": "none",
  },
  "content": {
    "@odata.type": "microsoft.graph.windowsUpdates.catalogContent",
  },
  "settings": {
    "@odata.type": "microsoft.graph.windowsUpdates.deploymentSettings",
    "schedule": {
      "gradualRollout": {
        "@odata.type": "#microsoft.graph.windowsUpdates.rateDrivenRolloutSettings",
        "durationBetweenOffers": "P1D",
        "devicePerOffer": 1000
      }
    },
    "monitoring": {
      "monitoringRules": [
        {
          "@odata.type": "#microsoft.graph.windowsUpdates.monitoringRule",
          "signal": "rollback",
          "threshold": 5,
          "action": "pauseDeployment"
        }
      ]
    },
    "userExperience": null,
    "safeguard": null
  },
}