[GH-ISSUE #2414] Applying Compliance Policy template to a tenant fails on DisplayName #1226

Closed
opened 2026-03-02 13:42:32 +03:00 by kerem · 4 comments
Owner

Originally created by @SGeeves on GitHub (May 7, 2024).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/2414

Originally assigned to: @JohnDuprey on GitHub.

Description

We have created a template from one of our tenants for Intune Device Compliance policies.
When trying to apply the policy from the template, we receive the error:

"Failed to add policy for removedforprivacy.onmicrosoft.com: compliancePolicy.DisplayName : The DisplayName field is required."

The DisplayName parameter is present in both the JSON code and the template wizard when applying.

Only affects Compliance Policies, configuration profiles apply without issue.

Environment data

Sponsored / Non-sponsored: Yes under FutureITNZ
Front end version number: 5.6.2
Back end version number: 5.6.3
Tried Tenant Cache Clear: false
Tried Token Cache Clear: false
Originally created by @SGeeves on GitHub (May 7, 2024). Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/2414 Originally assigned to: @JohnDuprey on GitHub. ### Description We have created a template from one of our tenants for Intune Device Compliance policies. When trying to apply the policy from the template, we receive the error: "Failed to add policy for *removedforprivacy*.onmicrosoft.com: compliancePolicy.DisplayName : The DisplayName field is required." The DisplayName parameter is present in both the JSON code and the template wizard when applying. Only affects Compliance Policies, configuration profiles apply without issue. ### Environment data ```PowerShell Sponsored / Non-sponsored: Yes under FutureITNZ Front end version number: 5.6.2 Back end version number: 5.6.3 Tried Tenant Cache Clear: false Tried Token Cache Clear: false ```
kerem 2026-03-02 13:42:32 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (May 7, 2024):

Thank you for creating a bug. Please make sure your bug is indeed a unique case by checking current and past issues, and reading the complete documentation at https://docs.cipp.app/
If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug."

Without confirming, your report will be closed in 24 hours. If you'd like this bug to be assigned to you, please comment "I would like to work on this please!".

<!-- gh-comment-id:2097429543 --> @github-actions[bot] commented on GitHub (May 7, 2024): Thank you for creating a bug. Please make sure your bug is indeed a unique case by checking current and past issues, and reading the complete documentation at https://docs.cipp.app/ If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug." Without confirming, your report will be closed in 24 hours. If you'd like this bug to be assigned to you, please comment "I would like to work on this please!".
Author
Owner

@Mave922 commented on GitHub (May 7, 2024):

I also have the same experience when deploying App Protection policies. Display name exists in the JSON file. The templates were created using CIPP to save an existing policy as a template.

<!-- gh-comment-id:2099151338 --> @Mave922 commented on GitHub (May 7, 2024): I also have the same experience when deploying App Protection policies. Display name exists in the JSON file. The templates were created using CIPP to save an existing policy as a template.
Author
Owner

@SGeeves commented on GitHub (May 9, 2024):

JSON from the template for reference.

{ "passwordExpirationDays": 365, "passwordMinimumNumericCharacters": null, "createdDateTime": "2024-05-02T01:11:05.479945Z", "passwordRequiredType": "numeric", "passwordMinutesOfInactivityBeforeLock": 10, "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceCompliancePolicies(scheduledActionsForRule(scheduledActionConfigurations()))/$entity", "deviceThreatProtectionEnabled": false, "advancedThreatProtectionRequiredSecurityLevel": "unavailable", "passwordMinimumSymbolCharacters": null, "osMaximumVersion": null, "passwordMinimumLength": 6, "passwordMinimumLowerCaseCharacters": null, "requireNoPendingSystemUpdates": null, "scheduledActionsForRule@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceCompliancePolicies('dc853329-3ee0-4bce-81dc-6ea975753405')/microsoft.graph.androidDeviceOwnerCompliancePolicy/scheduledActionsForRule(scheduledActionConfigurations())", "@odata.type": "#microsoft.graph.androidDeviceOwnerCompliancePolicy", "storageRequireEncryption": true, "minAndroidSecurityPatchLevel": null, "roleScopeTagIds": [ "0" ], "id": "dc853329-3ee0-4bce-81dc-6ea975753405", "scheduledActionsForRule": [ { "id": "dc853329-3ee0-4bce-81dc-6ea975753405", "scheduledActionConfigurations": [ { "notificationMessageCCList": [], "notificationTemplateId": "00000000-0000-0000-0000-000000000000", "id": "cff60ba6-bb45-42cf-ad01-74bfc0c8f92f", "gracePeriodHours": 36, "actionType": "block" }, { "notificationMessageCCList": [ "002cc3b4-0d41-45c3-bd2b-ad03268fbdf1" ], "notificationTemplateId": "dceed41b-3e2b-40db-830d-b221ea636345", "id": "c2fc8885-8040-451e-bb68-269001325dc4", "gracePeriodHours": 12, "actionType": "notification" }, { "notificationMessageCCList": [], "notificationTemplateId": "00000000-0000-0000-0000-000000000000", "id": "afc0145a-e2e2-42e0-bfa0-bda5693995c2", "gracePeriodHours": 12, "actionType": "pushNotification" } ], "ruleName": null, "scheduledActionConfigurations@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceCompliancePolicies('dc853329-3ee0-4bce-81dc-6ea975753405')/microsoft.graph.androidDeviceOwnerCompliancePolicy/scheduledActionsForRule('dc853329-3ee0-4bce-81dc-6ea975753405')/scheduledActionConfigurations" } ], "passwordMinimumLetterCharacters": null, "passwordMinimumUpperCaseCharacters": null, "securityRequireSafetyNetAttestationBasicIntegrity": false, "passwordPreviousPasswordCountToBlock": 5, "passwordMinimumNonLetterCharacters": null, "securityRequireSafetyNetAttestationCertifiedDevice": false, "securityRequireIntuneAppIntegrity": true, "deviceThreatProtectionRequiredSecurityLevel": "unavailable", "securityRequiredAndroidSafetyNetEvaluationType": "basic", "osMinimumVersion": "9.0", "lastModifiedDateTime": "2024-05-02T01:20:45.3343692Z", "passwordRequired": true, "version": 2, "displayName": "FIT Baseline: Android Compliance - Business", "description": "This compliance policy is for coroprate owned devices, no work profile is created here, only approved applications in the Microsoft Tenant can be installed, no personal Google Account can be added to the play store. Devices have to be factory reset before enrolment.", "Type": "deviceCompliancePolicies", "GUID": "adab35dd-090e-46b8-9705-cb56e7419975" }

<!-- gh-comment-id:2101889530 --> @SGeeves commented on GitHub (May 9, 2024): JSON from the template for reference. `{ "passwordExpirationDays": 365, "passwordMinimumNumericCharacters": null, "createdDateTime": "2024-05-02T01:11:05.479945Z", "passwordRequiredType": "numeric", "passwordMinutesOfInactivityBeforeLock": 10, "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceCompliancePolicies(scheduledActionsForRule(scheduledActionConfigurations()))/$entity", "deviceThreatProtectionEnabled": false, "advancedThreatProtectionRequiredSecurityLevel": "unavailable", "passwordMinimumSymbolCharacters": null, "osMaximumVersion": null, "passwordMinimumLength": 6, "passwordMinimumLowerCaseCharacters": null, "requireNoPendingSystemUpdates": null, "scheduledActionsForRule@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceCompliancePolicies('dc853329-3ee0-4bce-81dc-6ea975753405')/microsoft.graph.androidDeviceOwnerCompliancePolicy/scheduledActionsForRule(scheduledActionConfigurations())", "@odata.type": "#microsoft.graph.androidDeviceOwnerCompliancePolicy", "storageRequireEncryption": true, "minAndroidSecurityPatchLevel": null, "roleScopeTagIds": [ "0" ], "id": "dc853329-3ee0-4bce-81dc-6ea975753405", "scheduledActionsForRule": [ { "id": "dc853329-3ee0-4bce-81dc-6ea975753405", "scheduledActionConfigurations": [ { "notificationMessageCCList": [], "notificationTemplateId": "00000000-0000-0000-0000-000000000000", "id": "cff60ba6-bb45-42cf-ad01-74bfc0c8f92f", "gracePeriodHours": 36, "actionType": "block" }, { "notificationMessageCCList": [ "002cc3b4-0d41-45c3-bd2b-ad03268fbdf1" ], "notificationTemplateId": "dceed41b-3e2b-40db-830d-b221ea636345", "id": "c2fc8885-8040-451e-bb68-269001325dc4", "gracePeriodHours": 12, "actionType": "notification" }, { "notificationMessageCCList": [], "notificationTemplateId": "00000000-0000-0000-0000-000000000000", "id": "afc0145a-e2e2-42e0-bfa0-bda5693995c2", "gracePeriodHours": 12, "actionType": "pushNotification" } ], "ruleName": null, "scheduledActionConfigurations@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceCompliancePolicies('dc853329-3ee0-4bce-81dc-6ea975753405')/microsoft.graph.androidDeviceOwnerCompliancePolicy/scheduledActionsForRule('dc853329-3ee0-4bce-81dc-6ea975753405')/scheduledActionConfigurations" } ], "passwordMinimumLetterCharacters": null, "passwordMinimumUpperCaseCharacters": null, "securityRequireSafetyNetAttestationBasicIntegrity": false, "passwordPreviousPasswordCountToBlock": 5, "passwordMinimumNonLetterCharacters": null, "securityRequireSafetyNetAttestationCertifiedDevice": false, "securityRequireIntuneAppIntegrity": true, "deviceThreatProtectionRequiredSecurityLevel": "unavailable", "securityRequiredAndroidSafetyNetEvaluationType": "basic", "osMinimumVersion": "9.0", "lastModifiedDateTime": "2024-05-02T01:20:45.3343692Z", "passwordRequired": true, "version": 2, "displayName": "FIT Baseline: Android Compliance - Business", "description": "This compliance policy is for coroprate owned devices, no work profile is created here, only approved applications in the Microsoft Tenant can be installed, no personal Google Account can be added to the play store. Devices have to be factory reset before enrolment.", "Type": "deviceCompliancePolicies", "GUID": "adab35dd-090e-46b8-9705-cb56e7419975" }`
Author
Owner

@JohnDuprey commented on GitHub (May 14, 2024):

Thanks for the report! This is fixed in dev and will be in the next release. You'll be able to select device compliance as the policy type when importing the JSON now.

image

<!-- gh-comment-id:2110522807 --> @JohnDuprey commented on GitHub (May 14, 2024): Thanks for the report! This is fixed in dev and will be in the next release. You'll be able to select device compliance as the policy type when importing the JSON now. ![image](https://github.com/KelvinTegelaar/CIPP/assets/15741649/6b965040-a119-4ba6-a74c-2474a1ee3443)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/CIPP#1226
No description provided.