Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntuneDeviceConfigurationCustomPolicyWindows10: Cannot compare OmaSettings which contain a boolean Value of $False #5384

Closed
ricmestre opened this issue Nov 11, 2024 · 0 comments · Fixed by #5385 or #5397

Comments

@ricmestre
Copy link
Contributor

Description of the issue

This was working before and some change somewhere affected this resource, the deployment is done correctly without issues and the settings are correct but Compare-M365DSCComplexObject reports that the resource is not in desired stated whenever there's at least 1 OmaSettings defined where it's a odataType = '#microsoft.graph.omaSettingBoolean' and Value = $False, if Value is set to $True then the comparison works without issues. The comparison also works without issues with any other odataType such as string and integer.

Microsoft 365 DSC Version

1.24.1106.3

Which workloads are affected

Intune

The DSC configuration

IntuneDeviceConfigurationCustomPolicyWindows10 "IntuneDeviceConfigurationCustomPolicyWindows10-IntuneDeviceConfigurationCustomPolicyWindows10_5"
        {
            Assignments          = @(
                MSFT_DeviceManagementConfigurationPolicyAssignments{
                    deviceAndAppManagementAssignmentFilterType = 'none'
                    groupDisplayName = 'DummyGroupExclude'
                    dataType = '#microsoft.graph.exclusionGroupAssignmentTarget'
                    groupId = '053dc89a-be83-411a-bad3-909904b7239e'
                }
                MSFT_DeviceManagementConfigurationPolicyAssignments{
                    deviceAndAppManagementAssignmentFilterType = 'none'
                    groupDisplayName = 'DummyGroupInclude'
                    dataType = '#microsoft.graph.groupAssignmentTarget'
                    groupId = 'b0b8fd3f-af2a-453b-be57-80182d599f02'
                }
            );
            Credential           = $Credscredential;
            DisplayName          = "IntuneDeviceConfigurationCustomPolicyWindows10_5";
            Ensure               = "Present";
            Id                   = "3c1db9b7-ba18-4152-85ac-03909559087a";
            OmaSettings          = @(
                MSFT_MicrosoftGraphomaSetting{
                    Description = 'AllowLocalPolicyMerge'
                    OmaUri = './Device/Vendor/MSFT/Firewall/MdmStore/PublicProfile/AllowLocalPolicyMerge'
                    Value = $False
                    odataType = '#microsoft.graph.omaSettingBoolean'
                    IsEncrypted = $False
                    DisplayName = 'AllowLocalPolicyMerge'
                }
            );
            SupportsScopeTags    = $True;
        }

Verbose logs showing the problem

N/A

Environment Information + PowerShell Version

Win11/PS5.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant