[GH-ISSUE #1750] Corrupted IntuneTemplates when editing them #928

Closed
opened 2026-03-02 12:46:22 +03:00 by kerem · 6 comments
Owner

Originally created by @DanielWahlgren on GitHub (Sep 20, 2023).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/1750

Description

When updating an IntuneTemplate by clicking the eye-icon under Intune - Device Management - Templates, making a change, for example updating the displayName, and pressing enter, the new JSON saved to the AzureTable is broken.

Testupdate on a copy of build in CIPP-Template (since CIPP restores the built in ones):
{ "name": "EVT Screen Timeout Settings", "platforms": "windows10", "technologies": "mdm", "roleScopeTagIds": [ "0" ], "settings": [ { "@odata.type": "#microsoft.graph.deviceManagementConfigurationSetting", "settingInstance": { "@odata.type": "#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance", "settingDefinitionId": "device_vendor_msft_policy_config_localpoliciessecurityoptions_interactivelogon_machineinactivitylimit_v2", "simpleSettingValue": { "@odata.type": "#microsoft.graph.deviceManagementConfigurationIntegerSettingValue", "value": 300 } } } ], "displayName": "TEST EVT Screen Timeout Settings", "description": "Sets the screen to lock after 5 minutes of inactivity", "Type": "Catalog", "GUID": "12160216-bf64-4eba-b730-1f2946d73655" }

Though instead of the above being saved to table storage, the following is saved:
{ "name": "EVT Screen Timeout Settings", "displayName": "TEST EVT Screen Timeout Settings", "description": "Sets the screen to lock after 5 minutes of inactivity", "Type": "Catalog", "settings": [{ "@odata.type": "#microsoft.graph.deviceManagementConfigurationSetting", "settingInstance": "System.Collections.Hashtable" } ], "technologies": "mdm", "platforms": "windows10", "roleScopeTagIds": ["0"] }

The policy also no longer shows up in the list of Templates.

Environment data

Non-sponsored instance
Front end version number: 4.2.1
Back end version number: 4.2.0
Tried Tenant Cache Clear: true
Tried Token Cache Clear: true
Originally created by @DanielWahlgren on GitHub (Sep 20, 2023). Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/1750 ### Description When updating an IntuneTemplate by clicking the eye-icon under Intune - Device Management - Templates, making a change, for example updating the displayName, and pressing enter, the new JSON saved to the AzureTable is broken. Testupdate on a copy of build in CIPP-Template (since CIPP restores the built in ones): `{ "name": "EVT Screen Timeout Settings", "platforms": "windows10", "technologies": "mdm", "roleScopeTagIds": [ "0" ], "settings": [ { "@odata.type": "#microsoft.graph.deviceManagementConfigurationSetting", "settingInstance": { "@odata.type": "#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance", "settingDefinitionId": "device_vendor_msft_policy_config_localpoliciessecurityoptions_interactivelogon_machineinactivitylimit_v2", "simpleSettingValue": { "@odata.type": "#microsoft.graph.deviceManagementConfigurationIntegerSettingValue", "value": 300 } } } ], "displayName": "TEST EVT Screen Timeout Settings", "description": "Sets the screen to lock after 5 minutes of inactivity", "Type": "Catalog", "GUID": "12160216-bf64-4eba-b730-1f2946d73655" }` Though instead of the above being saved to table storage, the following is saved: `{ "name": "EVT Screen Timeout Settings", "displayName": "TEST EVT Screen Timeout Settings", "description": "Sets the screen to lock after 5 minutes of inactivity", "Type": "Catalog", "settings": [{ "@odata.type": "#microsoft.graph.deviceManagementConfigurationSetting", "settingInstance": "System.Collections.Hashtable" } ], "technologies": "mdm", "platforms": "windows10", "roleScopeTagIds": ["0"] }` The policy also no longer shows up in the list of Templates. ### Environment data ```PowerShell Non-sponsored instance Front end version number: 4.2.1 Back end version number: 4.2.0 Tried Tenant Cache Clear: true Tried Token Cache Clear: true ```
kerem 2026-03-02 12:46:22 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Sep 20, 2023):

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:1727245876 --> @github-actions[bot] commented on GitHub (Sep 20, 2023): 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

@DanielWahlgren commented on GitHub (Sep 20, 2023):

I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.

<!-- gh-comment-id:1727248559 --> @DanielWahlgren commented on GitHub (Sep 20, 2023): I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.
Author
Owner

@KelvinTegelaar commented on GitHub (Sep 21, 2023):

confirmed to be a bug, the issue is that the JSON templates for intune are retrieved in a different way than all other templates, when you save a template the data is saved in the format for all regular templates, it needs to have it's own schema to be able to work.

To resolve this we'll have to revisit the template system for Intune, and make this match the schema we need for all other templates. That's going to be done in the next iteration, so expect +-3 weeks.

<!-- gh-comment-id:1729496790 --> @KelvinTegelaar commented on GitHub (Sep 21, 2023): confirmed to be a bug, the issue is that the JSON templates for intune are retrieved in a different way than all other templates, when you save a template the data is saved in the format for all regular templates, it needs to have it's own schema to be able to work. To resolve this we'll have to revisit the template system for Intune, and make this match the schema we need for all other templates. That's going to be done in the next iteration, so expect +-3 weeks.
Author
Owner

@cslfmsp commented on GitHub (Sep 27, 2023):

We hit this too, thank you!

<!-- gh-comment-id:1736517327 --> @cslfmsp commented on GitHub (Sep 27, 2023): We hit this too, thank you!
Author
Owner

@github-actions[bot] commented on GitHub (Oct 6, 2023):

This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://cipp.app/GettingStarted/Contributions/ . Please notify the team if you are working on this yourself.

<!-- gh-comment-id:1749878218 --> @github-actions[bot] commented on GitHub (Oct 6, 2023): This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://cipp.app/GettingStarted/Contributions/ . Please notify the team if you are working on this yourself.
Author
Owner

@DanielWahlgren commented on GitHub (Oct 9, 2023):

Just poking this so it isn't closed automatically, preventing users from finding it as easily.

<!-- gh-comment-id:1753006248 --> @DanielWahlgren commented on GitHub (Oct 9, 2023): Just poking this so it isn't closed automatically, preventing users from finding it as easily.
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#928
No description provided.