Create groupPolicyUploadedDefinition
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.
Create a new groupPolicyUploadedDefinition 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
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 |
HTTP Request
POST /deviceManagement/groupPolicyDefinitions
POST /deviceManagement/groupPolicyConfigurations/{groupPolicyConfigurationId}/definitionValues/{groupPolicyDefinitionValueId}/presentationValues/{groupPolicyPresentationValueId}/presentation/definition/category/definitions
POST /deviceManagement/groupPolicyConfigurations/{groupPolicyConfigurationId}/definitionValues/{groupPolicyDefinitionValueId}/presentationValues/{groupPolicyPresentationValueId}/presentation/definition/definitionFile/definitions
Request headers
Header | Value |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Accept | application/json |
Request body
In the request body, supply a JSON representation for the groupPolicyUploadedDefinition object.
The following table shows the properties that are required when you create the groupPolicyUploadedDefinition.
Property | Type | Description |
---|---|---|
classType | groupPolicyDefinitionClassType | Identifies the type of groups the policy can be applied to. Inherited from groupPolicyDefinition. Possible values are: user , machine . |
displayName | String | The localized policy name. Inherited from groupPolicyDefinition |
explainText | String | The localized explanation or help text associated with the policy. The default value is empty. Inherited from groupPolicyDefinition |
categoryPath | String | The localized full category path for the policy. Inherited from groupPolicyDefinition |
supportedOn | String | Localized string used to specify what operating system or application version is affected by the policy. Inherited from groupPolicyDefinition |
policyType | groupPolicyType | Specifies the type of group policy. Inherited from groupPolicyDefinition. Possible values are: admxBacked , admxIngested . |
hasRelatedDefinitions | Boolean | Signifies whether or not there are related definitions to this definition Inherited from groupPolicyDefinition |
groupPolicyCategoryId | Guid | The category id of the parent category Inherited from groupPolicyDefinition |
minDeviceCspVersion | String | Minimum required CSP version for device configuration in this definition Inherited from groupPolicyDefinition |
minUserCspVersion | String | Minimum required CSP version for user configuration in this definition Inherited from groupPolicyDefinition |
version | String | Setting definition version Inherited from groupPolicyDefinition |
id | String | Key of the entity. Inherited from groupPolicyDefinition |
lastModifiedDateTime | DateTimeOffset | The date and time the entity was last modified. Inherited from groupPolicyDefinition |
Response
If successful, this method returns a 201 Created
response code and a groupPolicyUploadedDefinition object in the response body.
Example
Request
Here is an example of the request.
POST https://graph.microsoft.com/beta/deviceManagement/groupPolicyDefinitions
Content-type: application/json
Content-length: 538
{
"@odata.type": "#microsoft.graph.groupPolicyUploadedDefinition",
"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"
}
Response
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 201 Created
Content-Type: application/json
Content-Length: 651
{
"@odata.type": "#microsoft.graph.groupPolicyUploadedDefinition",
"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": "a5f83119-3119-a5f8-1931-f8a51931f8a5",
"lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00"
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for