Update groupPolicyDefinition
Namespace: microsoft.graph
Important: Microsoft Graph APIs under the /beta version are subject to change; production use is not supported.
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Update the properties of a groupPolicyDefinition object.
This API is available in the following national cloud deployments.
Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
---|---|---|---|
✅ | ✅ | ✅ | ✅ |
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) | DeviceManagementConfiguration.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. |
Application | DeviceManagementConfiguration.ReadWrite.All |
PATCH /deviceManagement/groupPolicyDefinitions/{groupPolicyDefinitionId}
PATCH /deviceManagement/groupPolicyConfigurations/{groupPolicyConfigurationId}/definitionValues/{groupPolicyDefinitionValueId}/definition
PATCH /deviceManagement/groupPolicyConfigurations/{groupPolicyConfigurationId}/definitionValues/{groupPolicyDefinitionValueId}/presentationValues/{groupPolicyPresentationValueId}/presentation/definition
PATCH /deviceManagement/groupPolicyConfigurations/{groupPolicyConfigurationId}/definitionValues/{groupPolicyDefinitionValueId}/presentationValues/{groupPolicyPresentationValueId}/presentation/definition/nextVersionDefinition
PATCH /deviceManagement/groupPolicyConfigurations/{groupPolicyConfigurationId}/definitionValues/{groupPolicyDefinitionValueId}/presentationValues/{groupPolicyPresentationValueId}/presentation/definition/previousVersionDefinition
PATCH /deviceManagement/groupPolicyConfigurations/{groupPolicyConfigurationId}/definitionValues/{groupPolicyDefinitionValueId}/presentationValues/{groupPolicyPresentationValueId}/presentation/definition/category/definitions/{groupPolicyDefinitionId}
PATCH /deviceManagement/groupPolicyConfigurations/{groupPolicyConfigurationId}/definitionValues/{groupPolicyDefinitionValueId}/presentationValues/{groupPolicyPresentationValueId}/presentation/definition/definitionFile/definitions/{groupPolicyDefinitionId}
Header | Value |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Accept | application/json |
In the request body, supply a JSON representation for the groupPolicyDefinition object.
The following table shows the properties that are required when you create the groupPolicyDefinition.
Property | Type | Description |
---|---|---|
classType | groupPolicyDefinitionClassType | Identifies the type of groups the policy can be applied to. Possible values are: user , machine . |
displayName | String | The localized policy name. |
explainText | String | The localized explanation or help text associated with the policy. The default value is empty. |
categoryPath | String | The localized full category path for the policy. |
supportedOn | String | Localized string used to specify what operating system or application version is affected by the policy. |
policyType | groupPolicyType | Specifies the type of group policy. Possible values are: admxBacked , admxIngested . |
hasRelatedDefinitions | Boolean | Signifies whether or not there are related definitions to this definition |
groupPolicyCategoryId | Guid | The category id of the parent category |
minDeviceCspVersion | String | Minimum required CSP version for device configuration in this definition |
minUserCspVersion | String | Minimum required CSP version for user configuration in this definition |
version | String | Setting definition version |
id | String | Key of the entity. |
lastModifiedDateTime | DateTimeOffset | The date and time the entity was last modified. |
If successful, this method returns a 200 OK
response code and an updated groupPolicyDefinition object in the response body.
Here is an example of the request.
PATCH https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions/{groupPolicyDefinitionId}
Content-type: application/json
Content-length: 530
{
"@odata.type": "#microsoft.graph.groupPolicyDefinition",
"classType": "machine",
"displayName": "Display Name value",
"explainText": "Explain Text value",
"categoryPath": "Category Path value",
"supportedOn": "Supported On value",
"policyType": "admxIngested",
"hasRelatedDefinitions": true,
"groupPolicyCategoryId": "4d1e97a2-97a2-4d1e-a297-1e4da2971e4d",
"minDeviceCspVersion": "Min Device Csp Version value",
"minUserCspVersion": "Min User Csp Version value",
"version": "Version value"
}
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 200 OK
Content-Type: application/json
Content-Length: 643
{
"@odata.type": "#microsoft.graph.groupPolicyDefinition",
"classType": "machine",
"displayName": "Display Name value",
"explainText": "Explain Text value",
"categoryPath": "Category Path value",
"supportedOn": "Supported On value",
"policyType": "admxIngested",
"hasRelatedDefinitions": true,
"groupPolicyCategoryId": "4d1e97a2-97a2-4d1e-a297-1e4da2971e4d",
"minDeviceCspVersion": "Min Device Csp Version value",
"minUserCspVersion": "Min User Csp Version value",
"version": "Version value",
"id": "f9607947-7947-f960-4779-60f9477960f9",
"lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00"
}