From 5d00a023198a1ca7a5de94208235b4a926bb3be8 Mon Sep 17 00:00:00 2001 From: Ricardo Mestre Date: Fri, 6 Dec 2024 12:56:10 +0000 Subject: [PATCH] Fix policy retrieval --- CHANGELOG.md | 3 +++ .../MSFT_AADFeatureRolloutPolicy.psm1 | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca5bb76ad6..98afd374ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ # UNRELEASED +* AADFeatureRolloutPolicy + * Fixed policy retrieval + FIXES [#5521](https://github.com/microsoft/Microsoft365DSC/issues/5521) * IntuneDeviceManagementAndroidDeviceOwnerEnrollmentProfile * Fixing issue with the way the QrCodeImage property was exported and handled. * IntuneFirewallPolicyWindows10 diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADFeatureRolloutPolicy/MSFT_AADFeatureRolloutPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADFeatureRolloutPolicy/MSFT_AADFeatureRolloutPolicy.psm1 index 26944c5c3c..68edefd6e3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADFeatureRolloutPolicy/MSFT_AADFeatureRolloutPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADFeatureRolloutPolicy/MSFT_AADFeatureRolloutPolicy.psm1 @@ -98,10 +98,7 @@ function Get-TargetResource { $getValue = Get-MgBetaPolicyFeatureRolloutPolicy ` -Filter "DisplayName eq '$DisplayName'" ` - -ErrorAction SilentlyContinue | Where-Object ` - -FilterScript { - $_.AdditionalProperties.'@odata.type' -eq '#microsoft.graph.FeatureRolloutPolicy' - } + -ErrorAction SilentlyContinue } } #endregion