From c25be5110635a0ae90b48b600eb9f97add50b101 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Tue, 12 Sep 2023 16:33:21 -0400 Subject: [PATCH] Fixes #3422 --- CHANGELOG.md | 2 ++ .../MSFT_AADNamedLocationPolicy.psm1 | 8 ++++---- .../MSFT_AADNamedLocationPolicy.schema.mof | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe25e7b955..4d45000c06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ * AADNamedLocationPolicy * Set default value for CountryLookupMethod and removed unwanted properties FIXES [#3656](https://github.com/microsoft/Microsoft365DSC/issues/3656) + * Added support for compliantNetworkNamedLocation. + FIXES [#3422](https://github.com/microsoft/Microsoft365DSC/issues/3422) * IntuneAppProtectionPolicyAndroid * Added support for 'RequireClass3Biometrics' parameter * Added support for 'RequirePinAfterBiometricChange' parameter diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.psm1 index db7ec61077..a1615e9666 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.psm1 @@ -5,7 +5,7 @@ function Get-TargetResource param ( [Parameter()] - [ValidateSet('#microsoft.graph.countryNamedLocation', '#microsoft.graph.ipNamedLocation')] + [ValidateSet('#microsoft.graph.countryNamedLocation', '#microsoft.graph.ipNamedLocation', '#microsoft.graph.compliantNetworkNamedLocation')] [System.String] $OdataType, @@ -166,7 +166,7 @@ function Set-TargetResource param ( [Parameter()] - [ValidateSet('#microsoft.graph.countryNamedLocation', '#microsoft.graph.ipNamedLocation')] + [ValidateSet('#microsoft.graph.countryNamedLocation', '#microsoft.graph.ipNamedLocation', '#microsoft.graph.compliantNetworkNamedLocation')] [System.String] $OdataType, @@ -291,7 +291,7 @@ function Set-TargetResource } # Named Location should exist and will be configured to desired state elseif ($Ensure -eq 'Present' -and $CurrentAADNamedLocation.Ensure -eq 'Present') - { + { $VerboseAttributes = ($desiredValues | Out-String) Write-Verbose -Message "Updating existing AAD Named Location {$Displayname)} with attributes: $VerboseAttributes" @@ -319,7 +319,7 @@ function Test-TargetResource param ( [Parameter()] - [ValidateSet('#microsoft.graph.countryNamedLocation', '#microsoft.graph.ipNamedLocation')] + [ValidateSet('#microsoft.graph.countryNamedLocation', '#microsoft.graph.ipNamedLocation', '#microsoft.graph.compliantNetworkNamedLocation')] [System.String] $OdataType, diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.schema.mof index 285218272e..fa026109ed 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADNamedLocationPolicy/MSFT_AADNamedLocationPolicy.schema.mof @@ -1,7 +1,7 @@ [ClassVersion("1.0.0.0"), FriendlyName("AADNamedLocationPolicy")] class MSFT_AADNamedLocationPolicy : OMI_BaseResource { - [Write, Description("Specifies the Odata Type of a Named Location object in Azure Active Directory"), ValueMap{"#microsoft.graph.countryNamedLocation","#microsoft.graph.ipNamedLocation"}, Values{"#microsoft.graph.countryNamedLocation","#microsoft.graph.ipNamedLocation"}] string OdataType; + [Write, Description("Specifies the Odata Type of a Named Location object in Azure Active Directory"), ValueMap{"#microsoft.graph.countryNamedLocation","#microsoft.graph.ipNamedLocation","#microsoft.graph.compliantNetworkNamedLocation"}, Values{"#microsoft.graph.countryNamedLocation","#microsoft.graph.ipNamedLocation","#microsoft.graph.compliantNetworkNamedLocation"}] string OdataType; [Write, Description("Specifies the ID of a Named Location in Azure Active Directory.")] String Id; [Key, Description("Specifies the Display Name of a Named Location in Azure Active Directory")] string DisplayName; [Write, Description("Specifies the IP ranges of the Named Location in Azure Active Directory")] String IpRanges[];