mirror of
https://github.com/KelvinTegelaar/CIPP.git
synced 2026-04-25 16:26:09 +03:00
[GH-ISSUE #2414] Applying Compliance Policy template to a tenant fails on DisplayName #1226
Labels
No labels
API
Feature
NotABug
NotABug
Planned
Sponsor Priority
Sponsor Priority
bug
documentation
duplicate
enhancement
needs more info
no-activity
no-priority
not-assigned
pull-request
react-conversion
react-conversion
roadmap
security
stale
unconfirmed-by-user
unconfirmed-by-user
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/CIPP#1226
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
@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!".
@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.
@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" }@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.