microsoft/Microsoft365DSC

IntuneDeviceEnrollmentPlatformRestriction: Not exporting the default policy

ricmestre opened this issue · 1 comments

Description of the issue

Now that I was able to figure out to run Graph 2.19.0 with Az 12.0.0 in my DevOps pipelines, and can use M365DSC 1.24.515.2, I'm already seeing a few of problems, the one being reported here is that after IntuneDeviceEnrollmentPlatformRestriction was changed it can no longer export the default policy "All users and all devices".

@FabienTschanz Hi, we discussed the changes on this resource extensively but it seems you forgot to include the default policies in the export, or is the intention to have a separate DSC resource for it? Looking at the rest of the code I don't think so and it was just an oversight where you export only policies where DeviceEnrollmentConfigurationType equals singlePlatformRestriction, checking it quickly in my tenant the type for the default policy is platformRestrictions. Could you please check this?

Microsoft 365 DSC Version

1.24.515.2

Which workloads are affected

Intune

The DSC configuration

N/A

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, en-GB}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                                                                       Name                           Value                                                                                                                                                                               ----                           -----                                                                                                                                                                               PSVersion                      5.1.22621.2506                                                                                                                                                                      PSEdition                      Desktop                                                                                                                                                                             PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                             BuildVersion                   10.0.22621.2506                                                                                                                                                                     CLRVersion                     4.0.30319.42000                                                                                                                                                                     WSManStackVersion              3.0                                                                                                                                                                                 PSRemotingProtocolVersion      2.3                                                                                                                                                                                 SerializationVersion           1.1.0.1

@ricmestre Very sorry for that one, no idea how I missed the default policy. The fix is very simple and a PR is open to address it.