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.
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.
Important
In delegated scenarios with work or school accounts, the signed-in user must be an owner or member of the group or be assigned a supported Microsoft Entra role or a custom role with a supported role permission. Intune Administrator, or Windows Update Deployment Administrator are the least privileged roles supported for this operation.
HTTP request
POST /admin/windows/updates/updatePolicies/{updatePolicyId}/complianceChanges
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.WindowsUpdates;
using Microsoft.Kiota.Abstractions.Serialization;
var requestBody = new ContentApproval
{
OdataType = "#microsoft.graph.windowsUpdates.contentApproval",
Content = new CatalogContent
{
OdataType = "#microsoft.graph.windowsUpdates.catalogContent",
CatalogEntry = new FeatureUpdateCatalogEntry
{
OdataType = "#microsoft.graph.windowsUpdates.featureUpdateCatalogEntry",
Id = "6b7e60db-a8e4-426a-9aed-bd12b5c0b9d4",
},
},
DeploymentSettings = new DeploymentSettings
{
},
AdditionalData = new Dictionary<string, object>
{
{
"schedule" , new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"startDateTime", new UntypedString("String (timestamp)")
},
{
"gradualRollout", new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@odata.type", new UntypedString("#microsoft.graph.windowsUpdates.dateDrivenRolloutSettings")
},
{
"endDateTime", new UntypedString("String (timestamp)")
},
})
},
})
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Admin.Windows.Updates.UpdatePolicies["{updatePolicy-id}"].ComplianceChanges.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodelswindowsupdates "github.com/microsoftgraph/msgraph-beta-sdk-go/models/windowsupdates"
//other-imports
)
requestBody := graphmodelswindowsupdates.NewComplianceChange()
content := graphmodelswindowsupdates.NewCatalogContent()
catalogEntry := graphmodelswindowsupdates.NewFeatureUpdateCatalogEntry()
id := "6b7e60db-a8e4-426a-9aed-bd12b5c0b9d4"
catalogEntry.SetId(&id)
content.SetCatalogEntry(catalogEntry)
requestBody.SetContent(content)
deploymentSettings := graphmodelswindowsupdates.NewDeploymentSettings()
requestBody.SetDeploymentSettings(deploymentSettings)
additionalData := map[string]interface{}{
schedule := graph.New()
startDateTime := "String (timestamp)"
schedule.SetStartDateTime(&startDateTime)
gradualRollout := graph.New()
endDateTime := "String (timestamp)"
gradualRollout.SetEndDateTime(&endDateTime)
schedule.SetGradualRollout(gradualRollout)
requestBody.SetSchedule(schedule)
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
complianceChanges, err := graphClient.Admin().Windows().Updates().UpdatePolicies().ByUpdatePolicyId("updatePolicy-id").ComplianceChanges().Post(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.models.windowsupdates.ContentApproval complianceChange = new com.microsoft.graph.beta.models.windowsupdates.ContentApproval();
complianceChange.setOdataType("#microsoft.graph.windowsUpdates.contentApproval");
com.microsoft.graph.beta.models.windowsupdates.CatalogContent content = new com.microsoft.graph.beta.models.windowsupdates.CatalogContent();
content.setOdataType("#microsoft.graph.windowsUpdates.catalogContent");
com.microsoft.graph.beta.models.windowsupdates.FeatureUpdateCatalogEntry catalogEntry = new com.microsoft.graph.beta.models.windowsupdates.FeatureUpdateCatalogEntry();
catalogEntry.setOdataType("#microsoft.graph.windowsUpdates.featureUpdateCatalogEntry");
catalogEntry.setId("6b7e60db-a8e4-426a-9aed-bd12b5c0b9d4");
content.setCatalogEntry(catalogEntry);
complianceChange.setContent(content);
com.microsoft.graph.beta.models.windowsupdates.DeploymentSettings deploymentSettings = new com.microsoft.graph.beta.models.windowsupdates.DeploymentSettings();
complianceChange.setDeploymentSettings(deploymentSettings);
HashMap<String, Object> additionalData = new HashMap<String, Object>();
schedule = new ();
schedule.setStartDateTime("String (timestamp)");
gradualRollout = new ();
gradualRollout.setOdataType("#microsoft.graph.windowsUpdates.dateDrivenRolloutSettings");
gradualRollout.setEndDateTime("String (timestamp)");
schedule.setGradualRollout(gradualRollout);
additionalData.put("schedule", schedule);
complianceChange.setAdditionalData(additionalData);
com.microsoft.graph.models.windowsupdates.ComplianceChange result = graphClient.admin().windows().updates().updatePolicies().byUpdatePolicyId("{updatePolicy-id}").complianceChanges().post(complianceChange);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\WindowsUpdates\ContentApproval;
use Microsoft\Graph\Beta\Generated\Models\WindowsUpdates\CatalogContent;
use Microsoft\Graph\Beta\Generated\Models\WindowsUpdates\FeatureUpdateCatalogEntry;
use Microsoft\Graph\Beta\Generated\Models\WindowsUpdates\DeploymentSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ContentApproval();
$requestBody->setOdataType('#microsoft.graph.windowsUpdates.contentApproval');
$content = new CatalogContent();
$content->setOdataType('#microsoft.graph.windowsUpdates.catalogContent');
$contentCatalogEntry = new FeatureUpdateCatalogEntry();
$contentCatalogEntry->setOdataType('#microsoft.graph.windowsUpdates.featureUpdateCatalogEntry');
$contentCatalogEntry->setId('6b7e60db-a8e4-426a-9aed-bd12b5c0b9d4');
$content->setCatalogEntry($contentCatalogEntry);
$requestBody->setContent($content);
$deploymentSettings = new DeploymentSettings();
$requestBody->setDeploymentSettings($deploymentSettings);
$additionalData = [
'schedule' => [
'startDateTime' => 'String (timestamp)',
'gradualRollout' => [
'@odata.type' => '#microsoft.graph.windowsUpdates.dateDrivenRolloutSettings',
'endDateTime' => 'String (timestamp)',
],
],
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->admin()->windows()->updates()->updatePolicies()->byUpdatePolicyId('updatePolicy-id')->complianceChanges()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.windows_updates.content_approval import ContentApproval
from msgraph_beta.generated.models.windows_updates.catalog_content import CatalogContent
from msgraph_beta.generated.models.windows_updates.feature_update_catalog_entry import FeatureUpdateCatalogEntry
from msgraph_beta.generated.models.windows_updates.deployment_settings import DeploymentSettings
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ContentApproval(
odata_type = "#microsoft.graph.windowsUpdates.contentApproval",
content = CatalogContent(
odata_type = "#microsoft.graph.windowsUpdates.catalogContent",
catalog_entry = FeatureUpdateCatalogEntry(
odata_type = "#microsoft.graph.windowsUpdates.featureUpdateCatalogEntry",
id = "6b7e60db-a8e4-426a-9aed-bd12b5c0b9d4",
),
),
deployment_settings = DeploymentSettings(
),
additional_data = {
"schedule" : {
"start_date_time" : "String (timestamp)",
"gradual_rollout" : {
"@odata_type" : "#microsoft.graph.windowsUpdates.dateDrivenRolloutSettings",
"end_date_time" : "String (timestamp)",
},
},
}
)
result = await graph_client.admin.windows.updates.update_policies.by_update_policy_id('updatePolicy-id').compliance_changes.post(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.