almenscorner/IntuneCD

[BUG] Duplicate log entries and false positive settings change in logs when pushing security baselines

Closed this issue · 3 comments

Describe the bug
This issue might be related to #209 (comment).

When pushing settings catalog security baselines to an intune tenant where the security baseline already exists, The log indicates that settings have been changed, even though the settings are identical to what already exists in the tenant. Additionally, the "added value:" log output of that particular configuration profile is duplicated several hundred times, creating a large and hard to read log file.

To Reproduce
Push settings catalog security baselines to an intune tenant where the baseline already exists and have identical settings.

Expected behavior
If no changes have been made, the logs should reflect that, e.g., "No changes found for Settings Catalog: ...."

If changes have been made the "added value: ...." log output should only appear once.

Screenshots
Snip of log duplication when pushing windows365 security baseline.

Wed Sep 4 12:32:14 2024 [INFO] Updating Settings Catalog: Windows365Baseline, list changes:
Wed Sep 4 12:32:14 2024 [INFO] Setting: settings, Added Value: [{'id': '25', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge~smartscreen_preventsmartscreenpromptoverride', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge~smartscreen_preventsmartscreenpromptoverride_1', 'children': []}}}, {'id': '26', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_privacy_letappsactivatewithvoiceabovelock', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_privacy_letappsactivatewithvoiceabovelock_2', 'children': []}}}, {'id': '27', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_search_donotusewebresults', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_search_donotusewebresults_0', 'children': []}}}, {'id': '28', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_security_allowaddprovisioningpackage', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_security_allowaddprovisioningpackage_0', 'children': []}}}, {'id': '29', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_security_allowremoveprovisioningpackage', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_security_allowremoveprovisioningpackage_0', 'children': []}}}, {'id': '30', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_wifi_allowautoconnecttowifisensehotspots', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_wifi_allowautoconnecttowifisensehotspots_0', 'children': []}}}, {'id': '31', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_windowsinkworkspace_allowsuggestedappsinwindowsinkworkspace', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_windowsinkworkspace_allowsuggestedappsinwindowsinkworkspace_0', 'children': []}}}, {'id': '32', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_wirelessdisplay_requirepinforpairing', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_wirelessdisplay_requirepinforpairing_2', 'children': []}}}], Removed Value:

Wed Sep 4 12:32:14 2024 [INFO] Setting: settings, Added Value: [{'id': '25', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge~smartscreen_preventsmartscreenpromptoverride', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge~smartscreen_preventsmartscreenpromptoverride_1', 'children': []}}}, {'id': '26', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_privacy_letappsactivatewithvoiceabovelock', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_privacy_letappsactivatewithvoiceabovelock_2', 'children': []}}}, {'id': '27', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_search_donotusewebresults', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_search_donotusewebresults_0', 'children': []}}}, {'id': '28', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_security_allowaddprovisioningpackage', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_security_allowaddprovisioningpackage_0', 'children': []}}}, {'id': '29', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_security_allowremoveprovisioningpackage', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_security_allowremoveprovisioningpackage_0', 'children': []}}}, {'id': '30', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_wifi_allowautoconnecttowifisensehotspots', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_wifi_allowautoconnecttowifisensehotspots_0', 'children': []}}}, {'id': '31', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_windowsinkworkspace_allowsuggestedappsinwindowsinkworkspace', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_windowsinkworkspace_allowsuggestedappsinwindowsinkworkspace_0', 'children': []}}}, {'id': '32', 'settingInstance': {'@odata.type': '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance', 'settingDefinitionId': 'device_vendor_msft_policy_config_wirelessdisplay_requirepinforpairing', 'settingInstanceTemplateReference': None, 'choiceSettingValue': {'settingValueTemplateReference': None, 'value': 'device_vendor_msft_policy_config_wirelessdisplay_requirepinforpairing_2', 'children': []}}}], Removed Value:

Run type (please complete the following information):

  • Mode: 1 (Push)
  • Client : Azure Functions docker image
  • Version: 2.3.4

Additional context
Add any other context about the problem here.

I was able to replicate this and it seems to be a paging issue, test the latest beta and check if the issue is resolved: pip3 install IntuneCD==2.3.6b1

That resolved the issue

Great, I'll merge asap