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: Decrypted OmaSettings cannot be applied to other tenant #4083

Closed
ricmestre opened this issue Dec 21, 2023 · 0 comments · Fixed by #4084 or #4101

Comments

@ricmestre
Copy link
Contributor

Description of the issue

I added support to decrypt encrypted OmaSettings for IntuneDeviceConfigurationCustomPolicyWindows10 on #4059, nevertheless I forgot to change the property isEncrypted to $False if the setting was actually able to be decrypted, this leads to have the decrypted value in the blueprint but still mention that isEncrypted is $True so that config cannot be applied to other tenant.

The fix is to simply set isEncrypted to $False if the setting could be decrypted.

Microsoft 365 DSC Version

1.23.1220.1

Which workloads are affected

other

The DSC configuration

IntuneDeviceConfigurationCustomPolicyWindows10 "IntuneDeviceConfigurationCustomPolicyWindows10-Windows 10/11 - Custom CSP - Block MS Edge Shortcuts"
        {
            ApplicationId         = $ConfigurationData.NonNodeData.ApplicationId;
            Assignments           = @(
                MSFT_DeviceManagementConfigurationPolicyAssignments{
                    deviceAndAppManagementAssignmentFilterType = 'none'
                    dataType = '#microsoft.graph.exclusionGroupAssignmentTarget'
                    groupId = 'REDACTED'
                }
                MSFT_DeviceManagementConfigurationPolicyAssignments{
                    deviceAndAppManagementAssignmentFilterType = 'none'
                    dataType = '#microsoft.graph.groupAssignmentTarget'
                    groupId = 'REDACTED'
                }
            );
            CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint;
            Description           = "Windows 10/11 - Custom CSP - Block MS Edge Shortcuts";
            DisplayName           = "Windows 10/11 - Custom CSP - Block MS Edge Shortcuts";
            Ensure                = "Present";
            Id                    = "REDACTED";
            OmaSettings           = @(
                MSFT_MicrosoftGraphomaSetting{
                    Description = 'Block Duplicated Edge Shortcuts - Custom ADMX'
                    OmaUri = './Device/Vendor/MSFT/Policy/ConfigOperations/ADMXInstall/Windows/Policy/WindowsCustomizationsAdmx'
                    Value = '1'
                    odataType = '#microsoft.graph.omaSettingString'
                    IsEncrypted = $True
                    DisplayName = 'Block Duplicated Edge Shortcuts - Custom ADMX'
                }
                MSFT_MicrosoftGraphomaSetting{
                    Description = 'Disable Edge Desktop Shortcut Creation'
                    OmaUri = './Device/Vendor/MSFT/Policy/Config/Windows~Policy~C_Edge/DisableEdgeDesktopShortcutCreation'
                    Value = '1'
                    odataType = '#microsoft.graph.omaSettingString'
                    IsEncrypted = $True
                    DisplayName = 'Disable Edge Desktop Shortcut Creation'
                }
            );
            SupportsScopeTags     = $True;
            TenantId              = $OrganizationName;
        }

Verbose logs showing the problem

N/A

Environment Information + PowerShell Version

OsName               : Microsoft Windows 11 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage           : en-US
OsMuiLanguages       : {en-US, pt-PT}

Name                           Value
----                           -----
PSVersion                      5.1.22621.2428
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.2428
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.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