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

Release 1.24.710.1 #4856

Merged
merged 30 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
eef2644
Fix Intune policy assignment comparison
Jul 4, 2024
cd5024a
Fix complex object comparison when key is default available on target
Jul 4, 2024
9e57503
Fix settings instance array return value
FabienTschanz Jul 5, 2024
d1a18d8
Remove auth methods from bound params
ricmestre Jul 8, 2024
ff4f4fe
Don't check AntiPhishPolicy if removing
ricmestre Jul 8, 2024
17456b0
Update CHANGELOG.md
ricmestre Jul 8, 2024
4174461
Don't check HostedOutboundSpamFilterPolicy if removing
ricmestre Jul 8, 2024
65ee954
Various Fixes
NikCharlebois Jul 8, 2024
27c86de
Fixes
NikCharlebois Jul 8, 2024
264f94b
Merge pull request #4850 from NikCharlebois/AADGroup-Fix
NikCharlebois Jul 8, 2024
fac000e
Update M365DSCTelemetryEngine.psm1
NikCharlebois Jul 8, 2024
3e42649
Merge branch 'Dev' into fix/intune-settings-catalog-settings
FabienTschanz Jul 9, 2024
5bf537f
Merge branch 'Dev' into fix/intune-policy-assignment-comparison
FabienTschanz Jul 9, 2024
ac5a329
Fix missing assignments when filtered by display name in MacOS scripts
FabienTschanz Jul 9, 2024
3190fc3
Fix Microsoft Graph model complex object to hashtable
FabienTschanz Jul 9, 2024
1dc3770
Nav
NikCharlebois Jul 9, 2024
6e4775e
Merge pull request #4841 from FabienTschanz/fix/intune-policy-assignm…
ykuijs Jul 10, 2024
df78992
Updated Resources and Cmdlet documentation pages
NikCharlebois Jul 10, 2024
bed2eec
Merge branch 'Dev' into fix/intune-settings-catalog-settings
ykuijs Jul 10, 2024
f7b408b
Merge pull request #4845 from FabienTschanz/fix/intune-settings-catal…
ykuijs Jul 10, 2024
41ccc98
Update M365DSCTelemetryEngine.psm1
NikCharlebois Jul 10, 2024
463b182
Telemetry Updates
NikCharlebois Jul 10, 2024
6d0c7d4
Merge pull request #4853 from NikCharlebois/Telemetry-Roles
NikCharlebois Jul 10, 2024
75b6319
Merge branch 'Dev' into fix4846
NikCharlebois Jul 10, 2024
d01e24d
Merge pull request #4848 from ricmestre/fix4846
NikCharlebois Jul 10, 2024
2b28068
Merge branch 'Dev' into fix4847
NikCharlebois Jul 10, 2024
011b1bb
Merge pull request #4849 from ricmestre/fix4847
NikCharlebois Jul 10, 2024
b56f49f
Release 1.24.710.1
NikCharlebois Jul 10, 2024
5f403e5
Update M365DSCTelemetryEngine.psm1
NikCharlebois Jul 10, 2024
049e044
Merge pull request #4855 from NikCharlebois/1.24.710.1
NikCharlebois Jul 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Change log for Microsoft365DSC

# 1.24.710.1

* AADApplication
* Fixes an error where the duplicate error was being trapped,
which could cause extra instances to be created.
* AADGroup
* Fixes an error where the duplicate error was being trapped,
which could cause extra instances to be created.
* EXOAntiPhishRule
* Don't check if associated `EXOAntiPhishPolicy` is present while removing
resource since it's not required
FIXES [#4846](https://github.com/microsoft/Microsoft365DSC/issues/4846)
* EXOHostedOutboundSpamFilterRule
* Don't check if associated `EXOHostedOutboundSpamFilterPolicy` is present
while removing resource since it's not required
FIXES [#4847](https://github.com/microsoft/Microsoft365DSC/issues/4847)
* IntuneDeviceConfigurationPlatformScriptMacOS
* Fixes an issue where the assignments are missing if filtered by display name.
* M365DSCDRGUtil
* Fixes an issue where the return value was changed to a single object
instead of an array.
FIXES [#4844](https://github.com/microsoft/Microsoft365DSC/issues/4844)
* Fixes an issue where Graph models were not treated properly as a complex object.
* TELEMETRY
* Added instance count.
* Added roles scopes info.
* DEPENDENCIES
* Updated DSCParser to version 2.0.0.7.
* Updated Microsoft.Graph to version 2.20.0
* Updated Microsoft.PowerApps.Administration.PowerShell to version 2.0.191

# 1.24.703.1

* EXOCASMailboxPlan
Expand Down Expand Up @@ -35,6 +66,10 @@
* M365DSCDRGUtil
* Added Microsoft Graph filter functions.
* Force array as parameter in `Compare-M365DSCIntunePolicyAssignment`.
* Fixed an issue when comparing Intune policy assignments.
FIXES [#4830](https://github.com/microsoft/Microsoft365DSC/issues/4830)
* Fixed an issue when comparing complex objects where the key to compare is available as a
instance property on the class.
* MISC
* Added support for `startswith`, `endswith` and `contains` filter methods to Intune resources
that did not support it previously.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function Get-TargetResource
-TenantId $TenantId `
-Credential $Credential

return $nullReturn
throw $_
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ function Get-TargetResource
-TenantId $TenantId `
-Credential $Credential

return $nullReturn
throw $_
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,30 +295,22 @@ function Set-TargetResource
$ConnectionMode = New-M365DSCConnection -Workload 'ExchangeOnline' `
-InboundParameters $PSBoundParameters

# Make sure that the associated Policy exists;
$AssociatedPolicy = Get-AntiPhishPolicy -Identity $AntiPhishPolicy -ErrorAction 'SilentlyContinue'
if ($null -eq $AssociatedPolicy)
{
throw "Error attempting to create EXOAntiPhishRule {$Identity}. The specified AntiPhishPolicy {$AntiPhishPolicy} " + `
"doesn't exist. Make sure you either create it first or specify a valid policy."
}

$CurrentValues = Get-TargetResource @PSBoundParameters
$BoundParameters = ([System.Collections.Hashtable]$PSBoundParameters).Clone()
$BoundParameters = Remove-M365DSCAuthenticationParameter -BoundParameters $PSBoundParameters

if ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Absent')
{
$CreationParams = [System.Collections.Hashtable]($PSBoundParameters)
$CreationParams.Remove('Ensure') | Out-Null
$CreationParams.Remove('Credential') | Out-Null
$CreationParams.Add('Name', $Identity) | Out-Null
$CreationParams.Remove('Identity') | Out-Null
$CreationParams.Remove('ApplicationId') | Out-Null
$CreationParams.Remove('TenantId') | Out-Null
$CreationParams.Remove('CertificateThumbprint') | Out-Null
$CreationParams.Remove('CertificatePath') | Out-Null
$CreationParams.Remove('CertificatePassword') | Out-Null
$CreationParams.Remove('ManagedIdentity') | Out-Null
$CreationParams.Remove('AccessTokens') | Out-Null
$BoundParameters.Add('Name', $Identity) | Out-Null
$BoundParameters.Remove('Identity') | Out-Null

# Make sure that the associated Policy exists;
$AssociatedPolicy = Get-AntiPhishPolicy -Identity $AntiPhishPolicy -ErrorAction 'SilentlyContinue'
if ($null -eq $AssociatedPolicy)
{
throw "Error attempting to create EXOAntiPhishRule {$Identity}. The specified AntiPhishPolicy {$AntiPhishPolicy} " + `
"doesn't exist. Make sure you either create it first or specify a valid policy."
}

# New-AntiPhishRule has the Enabled parameter, Set-AntiPhishRule does not.
# There doesn't appear to be any way to change the Enabled state of a rule once created.
Expand All @@ -329,33 +321,31 @@ function Set-TargetResource
}

Write-Verbose -Message "Creating AntiPhishRule {$Identity}"
New-AntiPhishRule @CreationParams
New-AntiPhishRule @BoundParameters
}
elseif ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Present')
{
$UpdateParams = $PSBoundParameters
$UpdateParams.Remove('Ensure') | Out-Null
$UpdateParams.Remove('Credential') | Out-Null
$UpdateParams.Remove('Enabled') | Out-Null
$UpdateParams.Remove('ApplicationId') | Out-Null
$UpdateParams.Remove('TenantId') | Out-Null
$UpdateParams.Remove('CertificateThumbprint') | Out-Null
$UpdateParams.Remove('CertificatePath') | Out-Null
$UpdateParams.Remove('CertificatePassword') | Out-Null
$UpdateParams.Remove('ManagedIdentity') | Out-Null
$UpdateParams.Remove('AccessTokens') | Out-Null
$BoundParameters.Remove('Enabled') | Out-Null

# Make sure that the associated Policy exists;
$AssociatedPolicy = Get-AntiPhishPolicy -Identity $AntiPhishPolicy -ErrorAction 'SilentlyContinue'
if ($null -eq $AssociatedPolicy)
{
throw "Error attempting to create EXOAntiPhishRule {$Identity}. The specified AntiPhishPolicy {$AntiPhishPolicy} " + `
"doesn't exist. Make sure you either create it first or specify a valid policy."
}

# Check to see if the specified policy already has the rule assigned;
$existingRule = Get-AntiPhishRule | Where-Object -FilterScript { $_.AntiPhishPolicy -eq $AntiPhishPolicy }

if ($null -ne $existingRule)
{
# The rule is already assigned to the policy, do try to update the AntiPhishPolicy parameter;
$UpdateParams.Remove('AntiPhishPolicy') | Out-Null
$BoundParameters.Remove('AntiPhishPolicy') | Out-Null
}

Write-Verbose -Message "Updating AntiPhishRule {$Identity}."
Set-AntiPhishRule @UpdateParams
Set-AntiPhishRule @BoundParameters
}
if ($Ensure -eq 'Absent' -and $CurrentValues.Ensure -eq 'Present')
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,20 +290,20 @@ function Set-TargetResource
$ConnectionMode = New-M365DSCConnection -Workload 'ExchangeOnline' `
-InboundParameters $PSBoundParameters

# Make sure that the associated Policy exists;
$AssociatedPolicy = Get-HostedOutboundSpamFilterPolicy -Identity $HostedOutboundSpamFilterPolicy -ErrorAction 'SilentlyContinue'
if ($null -eq $AssociatedPolicy)
{
throw "Error attempting to create EXOHostedOutboundSpamFilterRule {$Identity}. The specified HostedOutboundSpamFilterPolicy " + `
"{$HostedOutboundSpamFilterPolicy} doesn't exist. Make sure you either create it first or specify a valid policy."
}

$CurrentValues = Get-TargetResource @PSBoundParameters
$BoundParameters = ([System.Collections.Hashtable]$PSBoundParameters).Clone()
$BoundParameters = Remove-M365DSCAuthenticationParameter -BoundParameters $BoundParameters

if ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Absent')
{
# Make sure that the associated Policy exists;
$AssociatedPolicy = Get-HostedOutboundSpamFilterPolicy -Identity $HostedOutboundSpamFilterPolicy -ErrorAction 'SilentlyContinue'
if ($null -eq $AssociatedPolicy)
{
throw "Error attempting to create EXOHostedOutboundSpamFilterRule {$Identity}. The specified HostedOutboundSpamFilterPolicy " + `
"{$HostedOutboundSpamFilterPolicy} doesn't exist. Make sure you either create it first or specify a valid policy."
}

if ($Enabled -and ('Disabled' -eq $CurrentValues.State))
{
# New-HostedOutboundSpamFilterRule has the Enabled parameter, Set-HostedOutboundSpamFilterRule does not.
Expand All @@ -319,6 +319,15 @@ function Set-TargetResource
elseif ($Ensure -eq 'Present' -and $CurrentValues.Ensure -eq 'Present')
{
$BoundParameters.Remove('Enabled') | Out-Null

# Make sure that the associated Policy exists;
$AssociatedPolicy = Get-HostedOutboundSpamFilterPolicy -Identity $HostedOutboundSpamFilterPolicy -ErrorAction 'SilentlyContinue'
if ($null -eq $AssociatedPolicy)
{
throw "Error attempting to create EXOHostedOutboundSpamFilterRule {$Identity}. The specified HostedOutboundSpamFilterPolicy " + `
"{$HostedOutboundSpamFilterPolicy} doesn't exist. Make sure you either create it first or specify a valid policy."
}

if ($CurrentValues.HostedOutboundSpamFilterPolicy -eq $BoundParameters.HostedOutboundSpamFilterPolicy)
{
$BoundParameters.Remove('HostedOutboundSpamFilterPolicy') | Out-Null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MSFT_MicrosoftGraphOmaSetting
[Write, Description("Indicates whether the value field is encrypted. This property is read-only.")] Boolean IsEncrypted;
[Write, Description("OMA.")] String OmaUri;
[Write, Description("ReferenceId for looking up secret for decryption. This property is read-only.")] String SecretReferenceValueId;
[Write, Description("File name associated with the Value property (.cer")] String FileName;
[Write, Description("File name associated with the Value property (.cer)")] String FileName;
[Write, Description("Value. (Base64 encoded string)")] String Value;
[Write, Description("By setting to true, the CSP (configuration service provider) specified in the OMA-URI will perform a get, instead of set")] Boolean IsReadOnly;
[Write, Description("The type of the entity."), ValueMap{"#microsoft.graph.omaSettingBase64","#microsoft.graph.omaSettingBoolean","#microsoft.graph.omaSettingDateTime","#microsoft.graph.omaSettingFloatingPoint","#microsoft.graph.omaSettingInteger","#microsoft.graph.omaSettingString","#microsoft.graph.omaSettingStringXml"}, Values{"#microsoft.graph.omaSettingBase64","#microsoft.graph.omaSettingBoolean","#microsoft.graph.omaSettingDateTime","#microsoft.graph.omaSettingFloatingPoint","#microsoft.graph.omaSettingInteger","#microsoft.graph.omaSettingString","#microsoft.graph.omaSettingStringXml"}] String odataType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function Get-TargetResource
-ErrorAction SilentlyContinue
if ($null -ne $getValue)
{
$getValue = Get-MgBetaDeviceManagementDeviceShellScript -DeviceShellScriptId $getValue.Id
$getValue = Get-MgBetaDeviceManagementDeviceShellScript -DeviceShellScriptId $getValue.Id -ExpandProperty "assignments"
}
}
}
Expand Down Expand Up @@ -346,6 +346,7 @@ function Set-TargetResource
$UpdateParameters.$key = Convert-M365DSCDRGComplexTypeToHashtable -ComplexObject $UpdateParameters.$key
}
}

#region resource generator code
$UpdateParameters.Add("@odata.type", "#microsoft.graph.DeviceShellScript")
Update-MgBetaDeviceManagementDeviceShellScript `
Expand Down
40 changes: 20 additions & 20 deletions Modules/Microsoft365DSC/Dependencies/Manifest.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -2,87 +2,87 @@
Dependencies = @(
@{
ModuleName = 'DSCParser'
RequiredVersion = '2.0.0.6'
RequiredVersion = '2.0.0.7'
},
@{
ModuleName = 'ExchangeOnlineManagement'
RequiredVersion = '3.4.0'
},
@{
ModuleName = 'Microsoft.Graph.Applications'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Authentication'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.DeviceManagement'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.Devices.CorporateManagement'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.DeviceManagement.Administration'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.DeviceManagement.Enrollment'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.Identity.DirectoryManagement'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.Identity.Governance'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.Identity.SignIns'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.Reports'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.Teams'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.DeviceManagement.Administration'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Beta.DirectoryObjects'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Groups'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Planner'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Sites'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Users'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.Graph.Users.Actions'
RequiredVersion = '2.19.0'
RequiredVersion = '2.20.0'
},
@{
ModuleName = 'Microsoft.PowerApps.Administration.PowerShell'
RequiredVersion = '2.0.188'
RequiredVersion = '2.0.191'
},
@{
ModuleName = 'MicrosoftTeams'
Expand Down
Loading
Loading