Skip to content

Commit f1f68ce

Browse files
Merge pull request #6048 from microsoft/Dev
Release 1.25.423.1
2 parents db8b00b + fc82541 commit f1f68ce

File tree

17 files changed

+450
-168
lines changed

17 files changed

+450
-168
lines changed

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Change log for Microsoft365DSC
22

3+
# 1.25.423.1
4+
5+
* AADEntitlementManagementConnectedOrganization
6+
* Fixed an issue where an empty display name would result in a parameter binding exception.
7+
FIXES [#4981](https://github.com/microsoft/Microsoft365DSC/issues/4981)
8+
* EXOHostedContentFilterPolicy
9+
* Fixed an issue with setting the default value for `IntraOrgFilterState`.
10+
FIXES [#5031](https://github.com/microsoft/Microsoft365DSC/issues/5031)
11+
* IntuneAppProtectionPolicyiOS
12+
* Fixed empty array comparison.
13+
FIXES [#5736](https://github.com/microsoft/Microsoft365DSC/issues/5736)
14+
* IntuneDeviceEnrollmentLimitRestriction
15+
* Added support for `Assignments`, `Priority` and `RoleScopeTagIds` properties.
16+
FIXES [#3915](https://github.com/microsoft/Microsoft365DSC/issues/3915)
17+
* IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile
18+
* Fixes the data type for extraction and creation.
19+
* SPOSearchManagedProperty
20+
* Fixed an issue where the connection url was not the admin url required by the resource.
21+
FIXES [#5093](https://github.com/microsoft/Microsoft365DSC/issues/5093)
22+
FIXES [#4538](https://github.com/microsoft/Microsoft365DSC/issues/4538)
23+
* DEPENDENCIES
24+
* Updated Microsoft.Graph to version 2.27.0.
25+
* Updated MSCoudLoginAssistant to version 1.1.43.
26+
* MISC
27+
* Fixes case sensitivity comparison when updating device configuration policies.
28+
329
# 1.25.416.1
430

531
* EXOResourceConfiguration

Modules/Microsoft365DSC/DSCResources/MSFT_AADEntitlementManagementConnectedOrganization/MSFT_AADEntitlementManagementConnectedOrganization.psm1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,20 @@ function Get-TargetResource
8989

9090
$getValue = $null
9191

92-
if (-not [System.String]::IsNullOrEmpty($id))
92+
if (-not [System.String]::IsNullOrEmpty($Id))
9393
{
94-
$getValue = Get-MgBetaEntitlementManagementConnectedOrganization -ConnectedOrganizationId $id `
94+
$getValue = Get-MgBetaEntitlementManagementConnectedOrganization -ConnectedOrganizationId $Id `
9595
-ErrorAction SilentlyContinue
9696
}
9797

9898
if ($null -eq $getValue)
9999
{
100-
if (-not [System.String]::IsNullOrEmpty($id))
100+
if (-not [System.String]::IsNullOrEmpty($Id))
101101
{
102-
Write-Verbose -Message "Entitlement Management Connected Organization with id {$id} was not found."
102+
Write-Verbose -Message "Entitlement Management Connected Organization with id {$Id} was not found."
103103
}
104104

105-
if (-Not [string]::IsNullOrEmpty($DisplayName))
105+
if (-not [string]::IsNullOrEmpty($DisplayName))
106106
{
107107
$getValue = Get-MgBetaEntitlementManagementConnectedOrganization `
108108
-Filter "displayName eq '$DisplayName'" `
@@ -787,7 +787,7 @@ function Export-TargetResource
787787
Write-M365DSCHost -Message " |---[$i/$($getValue.Count)] $displayedKey" -DeferWrite
788788
$params = @{
789789
id = $config.id
790-
DisplayName = $config.displayName
790+
DisplayName = $displayedKey
791791
Ensure = 'Present'
792792
Credential = $Credential
793793
ApplicationId = $ApplicationId

Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -733,20 +733,14 @@ function Set-TargetResource
733733
-InboundParameters $PSBoundParameters
734734

735735
Write-Verbose (Get-HostedContentFilterPolicy | Out-String)
736-
$HostedContentFilterPolicies = Get-HostedContentFilterPolicy
737-
738-
$HostedContentFilterPolicy = $HostedContentFilterPolicies | Where-Object -FilterScript { $_.Identity -eq $Identity }
739-
$HostedContentFilterPolicyParams = [System.Collections.Hashtable]($PSBoundParameters)
740-
$HostedContentFilterPolicyParams.Remove('Ensure') | Out-Null
741-
$HostedContentFilterPolicyParams.Remove('Credential') | Out-Null
742-
$HostedContentFilterPolicyParams.Remove('MakeDefault') | Out-Null
743-
$HostedContentFilterPolicyParams.Remove('ApplicationId') | Out-Null
744-
$HostedContentFilterPolicyParams.Remove('TenantId') | Out-Null
745-
$HostedContentFilterPolicyParams.Remove('CertificateThumbprint') | Out-Null
746-
$HostedContentFilterPolicyParams.Remove('CertificatePath') | Out-Null
747-
$HostedContentFilterPolicyParams.Remove('CertificatePassword') | Out-Null
748-
$HostedContentFilterPolicyParams.Remove('ManagedIdentity') | Out-Null
749-
$HostedContentFilterPolicyParams.Remove('AccessTokens') | Out-Null
736+
$HostedContentFilterPolicy = Get-HostedContentFilterPolicy -Identity $Identity
737+
738+
$HostedContentFilterPolicyParams = Remove-M365DSCAuthenticationParameter -BoundParameters $PSBoundParameters
739+
740+
if ($IntraOrgFilterState -eq 'Default')
741+
{
742+
$HostedContentFilterPolicyParams.IntraOrgFilterState = 'HighConfidencePhish'
743+
}
750744

751745
if (('Present' -eq $Ensure ) -and ($null -eq $HostedContentFilterPolicy))
752746
{
@@ -759,6 +753,7 @@ function Set-TargetResource
759753
if ($PSBoundParameters.MakeDefault)
760754
{
761755
Write-Verbose -Message 'Updating Policy as default'
756+
$HostedContentFilterPolicyParams.Remove('MakeDefault') | Out-Null
762757
Set-HostedContentFilterPolicy @HostedContentFilterPolicyParams -MakeDefault -Confirm:$false
763758
}
764759
}
@@ -768,6 +763,7 @@ function Set-TargetResource
768763
if ($PSBoundParameters.MakeDefault)
769764
{
770765
Write-Verbose -Message 'Updating Policy as default'
766+
$HostedContentFilterPolicyParams.Remove('MakeDefault') | Out-Null
771767
Set-HostedContentFilterPolicy @HostedContentFilterPolicyParams -MakeDefault -Confirm:$false
772768
}
773769
else
@@ -1089,6 +1085,11 @@ function Test-TargetResource
10891085
$ValuesToCheck.Remove('EndUserSpamNotificationFrequency') | Out-Null
10901086
$ValuesToCheck.Remove('EndUserSpamNotificationCustomSubject') | Out-Null
10911087

1088+
if ($CurrentValues.IntraOrgFilterState -ne $IntraOrgFilterState -and $IntraOrgFilterState -eq 'Default')
1089+
{
1090+
$ValuesToCheck.IntraOrgFilterState = 'HighConfidencePhish'
1091+
}
1092+
10921093
$TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues `
10931094
-Source $($MyInvocation.MyCommand.Source) `
10941095
-DesiredValues $PSBoundParameters `

Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppProtectionPolicyiOS/MSFT_IntuneAppProtectionPolicyiOS.psm1

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -447,37 +447,37 @@ function Get-TargetResource
447447
$myPeriodOfflineBeforeAccessCheck = $policy.PeriodOfflineBeforeAccessCheck
448448
if ($null -ne $policy.PeriodOfflineBeforeAccessCheck)
449449
{
450-
$myPeriodOfflineBeforeAccessCheck = $policy.PeriodOfflineBeforeAccessCheck.toString()
450+
$myPeriodOfflineBeforeAccessCheck = $policy.PeriodOfflineBeforeAccessCheck.ToString()
451451
}
452452

453453
$myPeriodOnlineBeforeAccessCheck = $policy.PeriodOnlineBeforeAccessCheck
454454
if ($null -ne $policy.PeriodOnlineBeforeAccessCheck)
455455
{
456-
$myPeriodOnlineBeforeAccessCheck = $policy.PeriodOnlineBeforeAccessCheck.toString()
456+
$myPeriodOnlineBeforeAccessCheck = $policy.PeriodOnlineBeforeAccessCheck.ToString()
457457
}
458458

459459
$myPeriodOfflineBeforeWipeIsEnforced = $policy.PeriodOfflineBeforeWipeIsEnforced
460460
if ($null -ne $policy.PeriodOfflineBeforeWipeIsEnforced)
461461
{
462-
$myPeriodOfflineBeforeWipeIsEnforced = $policy.PeriodOfflineBeforeWipeIsEnforced.toString()
462+
$myPeriodOfflineBeforeWipeIsEnforced = $policy.PeriodOfflineBeforeWipeIsEnforced.ToString()
463463
}
464464

465465
$myPeriodBeforePinReset = $policy.PeriodBeforePinReset
466466
if ($null -ne $policy.PeriodBeforePinReset)
467467
{
468-
$myPeriodBeforePinReset = $policy.PeriodBeforePinReset.toString()
468+
$myPeriodBeforePinReset = $policy.PeriodBeforePinReset.ToString()
469469
}
470470

471471
$myPinRequiredInsteadOfBiometricTimeout = $policy.PinRequiredInsteadOfBiometricTimeout
472472
if ($null -ne $policy.PinRequiredInsteadOfBiometricTimeout)
473473
{
474-
$myPinRequiredInsteadOfBiometricTimeout = $policy.PinRequiredInsteadOfBiometricTimeout.toString()
474+
$myPinRequiredInsteadOfBiometricTimeout = $policy.PinRequiredInsteadOfBiometricTimeout.ToString()
475475
}
476476

477477
$myGracePeriodToBlockAppsDuringOffClockHours = $policy.gracePeriodToBlockAppsDuringOffClockHours
478478
if ($null -ne $policy.gracePeriodToBlockAppsDuringOffClockHours)
479479
{
480-
$myGracePeriodToBlockAppsDuringOffClockHours = $policy.gracePeriodToBlockAppsDuringOffClockHours.toString()
480+
$myGracePeriodToBlockAppsDuringOffClockHours = $policy.gracePeriodToBlockAppsDuringOffClockHours.ToString()
481481
}
482482

483483
$AllowedDataIngestionLocationsValue = @()
@@ -486,8 +486,26 @@ function Get-TargetResource
486486
$AllowedDataIngestionLocationsValue = [String[]]($policy.AllowedDataIngestionLocations)
487487
}
488488

489+
$exemptedUniversalLinks = @()
490+
if ($null -ne $policy.exemptedUniversalLinks)
491+
{
492+
$exemptedUniversalLinks = [String[]]($policy.exemptedUniversalLinks)
493+
}
494+
495+
$managedUniversalLinks = @()
496+
if ($null -ne $policy.managedUniversalLinks)
497+
{
498+
$managedUniversalLinks = [String[]]($policy.managedUniversalLinks)
499+
}
500+
501+
$AllowedDataStorageLocations = @()
502+
if ($null -ne $policy.AllowedDataStorageLocations)
503+
{
504+
$AllowedDataStorageLocations = [String[]]($policy.AllowedDataStorageLocations)
505+
}
506+
489507
return @{
490-
Identity = $policy.id
508+
Identity = $policy.Id
491509
DisplayName = $policy.DisplayName
492510
Description = $policy.Description
493511
AllowedDataIngestionLocations = $AllowedDataIngestionLocationsValue
@@ -499,10 +517,10 @@ function Get-TargetResource
499517
CustomDialerAppProtocol = [string]$policy.customDialerAppProtocol
500518
DeployedAppCount = $policy.deployedAppCount
501519
DialerRestrictionLevel = [string]$policy.dialerRestrictionLevel
502-
ExemptedUniversalLinks = $policy.exemptedUniversalLinks
520+
ExemptedUniversalLinks = $exemptedUniversalLinks
503521
GracePeriodToBlockAppsDuringOffClockHours = $myGracePeriodToBlockAppsDuringOffClockHours
504522
IsAssigned = $policy.isAssigned
505-
ManagedUniversalLinks = $policy.managedUniversalLinks
523+
ManagedUniversalLinks = $managedUniversalLinks
506524
MaximumAllowedDeviceThreatLevel = [string]$policy.maximumAllowedDeviceThreatLevel
507525
MaximumRequiredOsVersion = [string]$policy.maximumRequiredOsVersion
508526
MaximumWarningOsVersion = [string]$policy.maximumWarningOsVersion
@@ -537,7 +555,7 @@ function Get-TargetResource
537555
SimplePinBlocked = $policy.SimplePinBlocked
538556
MinimumPinLength = $policy.MinimumPinLength
539557
PinCharacterSet = [String]$policy.PinCharacterSet
540-
AllowedDataStorageLocations = [String[]]$policy.AllowedDataStorageLocations
558+
AllowedDataStorageLocations = $AllowedDataStorageLocations
541559
ContactSyncBlocked = $policy.ContactSyncBlocked
542560
PeriodBeforePinReset = $myPeriodBeforePinReset
543561
FaceIdBlocked = $policy.FaceIdBlocked
@@ -979,7 +997,7 @@ function Set-TargetResource
979997
if ($Ensure -eq 'Present' -and $currentPolicy.Ensure -eq 'Absent')
980998
{
981999
Write-Verbose -Message "Creating new iOS App Protection Policy {$DisplayName}"
982-
$createParameters = ([Hashtable]$PSBoundParameters).clone()
1000+
$createParameters = ([Hashtable]$PSBoundParameters).Clone()
9831001
$createParameters.Remove('Identity')
9841002
$createParameters.Remove('Assignments')
9851003
$createParameters.Remove('Apps')
@@ -1001,7 +1019,7 @@ function Set-TargetResource
10011019
if (-not [String]::IsNullOrEmpty($createParameters.$duration))
10021020
{
10031021
Write-Verbose -Message "Parsing {$($createParameters.$duration)} into TimeSpan"
1004-
if ($createParameters.$duration.startswith('P'))
1022+
if ($createParameters.$duration.Startswith('P'))
10051023
{
10061024
$timespan = [System.Xml.XmlConvert]::ToTimeSpan($createParameters.$duration)
10071025
}
@@ -1016,8 +1034,8 @@ function Set-TargetResource
10161034
foreach ($exemptedAppProtocol in $ExemptedAppProtocols)
10171035
{
10181036
$myExemptedAppProtocols += @{
1019-
Name = $exemptedAppProtocol.split(':')[0]
1020-
Value = $exemptedAppProtocol.split(':')[1]
1037+
Name = $exemptedAppProtocol.Split(':')[0]
1038+
Value = $exemptedAppProtocol.Split(':')[1]
10211039
}
10221040
}
10231041
$createParameters.ExemptedAppProtocols = $myExemptedAppProtocols
@@ -1039,7 +1057,7 @@ function Set-TargetResource
10391057
elseif ($Ensure -eq 'Present' -and $currentPolicy.Ensure -eq 'Present')
10401058
{
10411059
Write-Verbose -Message "Updating existing iOS App Protection Policy {$DisplayName}"
1042-
$updateParameters = ([Hashtable]$PSBoundParameters).clone()
1060+
$updateParameters = ([Hashtable]$PSBoundParameters).Clone()
10431061
$updateParameters.Remove('Identity')
10441062
$updateParameters.Remove('Assignments')
10451063
$updateParameters.Remove('Apps')
@@ -1069,15 +1087,15 @@ function Set-TargetResource
10691087
{
10701088
if (-not [String]::IsNullOrEmpty($updateParameters.$duration))
10711089
{
1072-
$updateParameters.$duration = [TimeSpan]::parse($updateParameters.$duration)
1090+
$updateParameters.$duration = [TimeSpan]::Parse($updateParameters.$duration)
10731091
}
10741092
}
10751093
$myExemptedAppProtocols = @()
10761094
foreach ($exemptedAppProtocol in $ExemptedAppProtocols)
10771095
{
10781096
$myExemptedAppProtocols += @{
1079-
Name = $exemptedAppProtocol.split(':')[0]
1080-
Value = $exemptedAppProtocol.split(':')[1]
1097+
Name = $exemptedAppProtocol.Split(':')[0]
1098+
Value = $exemptedAppProtocol.Split(':')[1]
10811099
}
10821100
}
10831101
$updateParameters.ExemptedAppProtocols = $myExemptedAppProtocols
@@ -1471,7 +1489,7 @@ function Test-TargetResource
14711489
Write-Verbose -Message "Current Values: $(Convert-M365DscHashtableToString -Hashtable $CurrentValues)"
14721490
Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)"
14731491

1474-
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()
1492+
$ValuesToCheck = ([Hashtable]$PSBoundParameters).Clone()
14751493
$ValuesToCheck.Remove('Identity')
14761494

14771495
$TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues `

0 commit comments

Comments
 (0)