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.25.129.3 #5708

Merged
merged 37 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
090144e
Update MSFT_AADAccessReviewDefinition.psm1
NikCharlebois Dec 18, 2024
17a5d57
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Dec 18, 2024
23d89ab
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Dec 18, 2024
30a3383
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Dec 18, 2024
28bb113
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Dec 28, 2024
3b255f6
Update CHANGELOG.md
NikCharlebois Dec 28, 2024
b6073e3
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 15, 2025
3be2c80
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 15, 2025
d2e1773
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 15, 2025
f005185
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 16, 2025
2e3c244
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 22, 2025
3bdd451
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 23, 2025
9ee2fe6
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 24, 2025
454688c
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 27, 2025
3bd3583
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 27, 2025
33c80c2
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 28, 2025
3fc8c25
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 29, 2025
8e8ccea
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 29, 2025
cf085aa
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 29, 2025
3693b36
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 29, 2025
f3de785
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 30, 2025
69a0520
Updated Dependencies
NikCharlebois Jan 31, 2025
3c1938d
Merge pull request #5704 from NikCharlebois/Updated-Dependencies
NikCharlebois Jan 31, 2025
450b132
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 31, 2025
f660773
Updated MSCloudLoginAssistant
NikCharlebois Jan 31, 2025
63de878
Merge pull request #5705 from NikCharlebois/Updated-MSCloudLoginAssis…
NikCharlebois Jan 31, 2025
a71e924
Update Manifest.psd1
NikCharlebois Jan 31, 2025
a54ea54
Merge remote-tracking branch 'upstream' into Dev
NikCharlebois Jan 31, 2025
bb8fb90
Update CHANGELOG.md
NikCharlebois Jan 31, 2025
0823d33
Merge pull request #5706 from NikCharlebois/Dev
NikCharlebois Jan 31, 2025
12fbc7d
Fixing Rule Evaluation and Compliance Rules
NikCharlebois Jan 31, 2025
f25ac86
Update CHANGELOG.md
NikCharlebois Jan 31, 2025
f3554b2
EXOMigrationEndpoint
NikCharlebois Jan 31, 2025
a1a2924
Update MSFT_EXOMigrationEndpoint.schema.mof
NikCharlebois Jan 31, 2025
a984750
Update MSFT_EXOMigrationEndpoint.psm1
NikCharlebois Jan 31, 2025
ae6ba36
Release 1.25.129.3
NikCharlebois Jan 31, 2025
f4169ce
Merge pull request #5707 from NikCharlebois/Various-Fixes
NikCharlebois Jan 31, 2025
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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Change log for Microsoft365DSC

# 1.25.129.3

* EXOMigrationEndpoint
* Added support for EntpointType value of ExchangeRemoteMove.
* M365DSCRuleEvaluation
* Changed logic to evaluate cases where the rule results in no results.
* SPDLPComplianceRule
* Fix for the SensitiveInfoType ID cleaning logic in Get-TargetResource.
* DEPENDENCIES
* Updated Microsoft.PowerApps.Administration.PowerShell to version 2.0.205.
* Updated MicrosoftTeams to version 6.8.0.
* Updated MSCloudLoginAssistant to version 1.1.35.

# 1.25.129.2

* M365DSCRuleEvaluation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function Get-TargetResource
$Authentication,

[Parameter()]
[ValidateSet('IMAP')]
[ValidateSet('IMAP', 'ExchangeRemoteMove')]
[System.String]
$EndpointType,

Expand Down Expand Up @@ -208,7 +208,7 @@ function Set-TargetResource
$Authentication,

[Parameter()]
[ValidateSet('IMAP')]
[ValidateSet('IMAP', 'ExchangeRemoteMove')]
[System.String]
$EndpointType,

Expand Down Expand Up @@ -305,14 +305,14 @@ function Set-TargetResource

$currentInstance = Get-TargetResource @PSBoundParameters

$setParams = [System.Collections.Hashtable]($PSBoundParameters)
$setParams = ([Hashtable]$PSBoundParameters).Clone()
$setParams = Remove-M365DSCAuthenticationParameter -BoundParameters $setParams
$setParams.Remove('RemoteTenant')
$setParams.Remove('EndpointType')
$setParams.Remove('UseAutoDiscover')
$setParams.Add('Confirm', $false)

$newParams = [System.Collections.Hashtable]($PSBoundParameters)
$newParams = ([Hashtable]$PSBoundParameters).Clone()
$newParams = Remove-M365DSCAuthenticationParameter -BoundParameters $newParams
$newParams.Remove('EndpointType')
$newParams.Remove('Identity')
Expand All @@ -332,22 +332,40 @@ function Set-TargetResource

$newParams.Add('IMAP', [Switch]$true)
}
elseif ($EndpointType -eq 'ExchangeRemoteMove')
{
# Removing mailbox permission parameter as this is valid only for outlook anywhere migration
$setParams.Remove('MailboxPermission') | Out-Null
$newParams.Remove('MailboxPermission') | Out-Null
$newParams.Remove("AcceptUntrustedCertificates") | Out-Null
$setParams.Remove("AcceptUntrustedCertificates") | Out-Null

# adding skip verification switch to skip verifying
# that the remote server is reachable when creating a migration endpoint.
$setParams.Add('SkipVerification', [Switch]$true)
$newParams.Add('SkipVerification', [Switch]$true)

$newParams.Add('ExchangeRemoteMove', [Switch]$true)
}

# add the logic for other endpoint types ('Exchange Remote', 'Outlook Anywhere', 'Google Workspace')

# CREATE
if ($Ensure -eq 'Present' -and $currentInstance.Ensure -eq 'Absent')
{
Write-Verbose -Message "Creating new migration endpoint with parameters:`r`n$(ConvertTo-Json $newParams -Depth 10)"
New-MigrationEndpoint @newParams
}
# UPDATE
elseif ($Ensure -eq 'Present' -and $currentInstance.Ensure -eq 'Present')
{
Write-Verbose -Message "Updating migration endpoint with parameters:`r`n$(ConvertTo-Json $setParams -Depth 10)"
Set-MigrationEndpoint @setParams
}
# REMOVE
elseif ($Ensure -eq 'Absent' -and $currentInstance.Ensure -eq 'Present')
{
Write-Verbose -Message "Removing migration endpoint with id {$Identity}"
Remove-MigrationEndpoint -Identity $Identity
}
}
Expand Down Expand Up @@ -379,7 +397,7 @@ function Test-TargetResource
$Authentication,

[Parameter()]
[ValidateSet('IMAP')]
[ValidateSet('IMAP', 'ExchangeRemoteMove')]
[System.String]
$EndpointType,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class MSFT_EXOMigrationEndpoint : OMI_BaseResource
[Write, Description("The Application ID used for authentication.")] String AppID;
[Write, Description("The URL of the Key Vault that stores the application secret.")] String AppSecretKeyVaultUrl;
[Write, Description("The authentication method for the migration endpoint.")] String Authentication;
[Write, Description("The type of migration endpoint."), ValueMap{"IMAP"}, Values{"IMAP"}] String EndpointType;
[Write, Description("The type of migration endpoint."), ValueMap{"IMAP", "ExchangeRemoteMove"}, Values{"IMAP", "ExchangeRemoteMove"}] String EndpointType;
[Write, Description("The Exchange Server address for the migration endpoint.")] String ExchangeServer;
[Write, Description("The mailbox permission for the migration endpoint.")] String MailboxPermission;
[Write, Description("The maximum number of concurrent incremental syncs.")] String MaxConcurrentIncrementalSyncs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,86 +252,81 @@ function Test-TargetResource
[void]$message.AppendLine(" <ResourceName>$ResourceTypeName</ResourceName>")
[void]$message.AppendLine(" <RuleDefinition>$RuleDefinition</RuleDefinition>")

if ($instances.Length -eq 0)
if (-not [System.String]::IsNullOrEmpty($AfterRuleCountQuery))
{
[array]$invalidInstances = $DSCConvertedInstances.ResourceInstanceName
[void]$message.AppendLine(' <AfterRuleCount></AfterRuleCount>')
[void]$message.AppendLine(' <Match></Match>')
}
else
{
if (-not [System.String]::IsNullOrEmpty($AfterRuleCountQuery))
{
[void]$message.AppendLine(' <AfterRuleCount>')
[void]$message.AppendLine(" <Query>$AfterRuleCountQuery</Query>")
[void]$message.AppendLine(' <AfterRuleCount>')
[void]$message.AppendLine(" <Query>$AfterRuleCountQuery</Query>")

Write-Verbose -Message 'Checking the After Rule Count Query'
$afterRuleCountQueryString = "`$instances.Length $AfterRuleCountQuery"
$afterRuleCountQueryBlock = [Scriptblock]::Create($afterRuleCountQueryString)
$result = [Boolean](Invoke-Command -ScriptBlock $afterRuleCountQueryBlock)
[array]$validInstances = $instances.ResourceInstanceName
[array]$invalidInstances = $DSCConvertedInstances.ResourceInstanceName | Where-Object -FilterScript { $_ -notin $validInstances }
Write-Verbose -Message 'Checking the After Rule Count Query'
$afterRuleCountQueryString = "`$instances.Length $AfterRuleCountQuery"
$afterRuleCountQueryBlock = [Scriptblock]::Create($afterRuleCountQueryString)
$result = [Boolean](Invoke-Command -ScriptBlock $afterRuleCountQueryBlock)
[array]$validInstances = $instances.ResourceInstanceName
[array]$invalidInstances = $DSCConvertedInstances.ResourceInstanceName | Where-Object -FilterScript { $_ -notin $validInstances }

if (-not $result)
{
[void]$message.AppendLine(' <MetQuery>False</MetQuery>')
[void]$message.AppendLine(' </AfterRuleCount>')
if ($validInstances.Count -gt 0)
{
[void]$message.AppendLine(' <Match>')
foreach ($validInstance in $validInstances)
{
[void]$message.AppendLine(" <ResourceInstanceName>[$ResourceTypeName]$validInstance</ResourceInstanceName>")
}
[void]$message.AppendLine(' </Match>')
}
else
{
[void]$message.AppendLine(' <Match></Match>')
}
}
else
if (-not $result)
{
[void]$message.AppendLine(' <MetQuery>False</MetQuery>')
[void]$message.AppendLine(' </AfterRuleCount>')
if ($validInstances.Count -gt 0)
{
[void]$message.AppendLine(' <MetQuery>True</MetQuery>')
[void]$message.AppendLine(' </AfterRuleCount>')
[void]$message.AppendLine(' <Match>')
foreach ($validInstance in $validInstances)
{
[void]$message.AppendLine(" <ResourceInstanceName>[$ResourceTypeName]$validInstance</ResourceInstanceName>")
}
[void]$message.AppendLine(' </Match>')
}
else
{
[void]$message.AppendLine(' <Match></Match>')
}
}
else
{
[void]$message.AppendLine(' <AfterRuleCount></AfterRuleCount>')

$compareInstances = @()
$compareInstances += Compare-Object -ReferenceObject $DSCConvertedInstances.ResourceInstanceName -DifferenceObject $instances.ResourceInstanceName -IncludeEqual
if ($compareInstances.Count -gt 0)
[void]$message.AppendLine(' <MetQuery>True</MetQuery>')
[void]$message.AppendLine(' </AfterRuleCount>')
[void]$message.AppendLine(' <Match>')
foreach ($validInstance in $validInstances)
{
[array]$validInstances = $($compareInstances | Where-Object -FilterScript { $_.SideIndicator -eq '==' }).InputObject
[array]$invalidInstances = $($compareInstances | Where-Object -FilterScript { $_.SideIndicator -eq '<=' }).InputObject
}
else
{
[array]$validInstances = @()
[array]$invalidInstances = [array]$DSCConvertedInstances.ResourceInstanceName
[void]$message.AppendLine(" <ResourceInstanceName>[$ResourceTypeName]$validInstance</ResourceInstanceName>")
}
[void]$message.AppendLine(' </Match>')
}
}
else
{
[void]$message.AppendLine(' <AfterRuleCount></AfterRuleCount>')

if ($validInstances.Count -gt 0)
{
[void]$message.AppendLine(' <Match>')
foreach ($validInstance in $validInstances)
{
[void]$message.AppendLine(" <ResourceInstanceName>[$ResourceTypeName]$validInstance</ResourceInstanceName>")
}
[void]$message.AppendLine(' </Match>')
}
else
$compareInstances = @()
if ($DSCConvertedInstances.Length -gt 0)
{
$compareInstances += Compare-Object -ReferenceObject $DSCConvertedInstances.ResourceInstanceName -DifferenceObject $instances.ResourceInstanceName -IncludeEqual
}

if ($compareInstances.Count -gt 0)
{
[array]$validInstances = $($compareInstances | Where-Object -FilterScript { $_.SideIndicator -eq '==' }).InputObject
[array]$invalidInstances = $($compareInstances | Where-Object -FilterScript { $_.SideIndicator -eq '<=' }).InputObject
}
else
{
[array]$validInstances = @()
[array]$invalidInstances = [array]$DSCConvertedInstances.ResourceInstanceName
}

if ($validInstances.Count -gt 0)
{
[void]$message.AppendLine(' <Match>')
foreach ($validInstance in $validInstances)
{
[void]$message.AppendLine(' <Match></Match>')
[void]$message.AppendLine(" <ResourceInstanceName>[$ResourceTypeName]$validInstance</ResourceInstanceName>")
}
[void]$message.AppendLine(' </Match>')
}
else
{
[void]$message.AppendLine(' <Match></Match>')
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,14 @@ function Get-TargetResource
}
elseif ($null -ne $ruleObject.Condition.SubConditions[$index].Value.Groups.Sensitivetypes)
{
$ruleobject.Condition.SubConditions[$index].Value.Groups.Sensitivetypes = @($ruleobject.Condition.SubConditions[$index].Value.Groups.Sensitivetypes | Select-Object * -ExcludeProperty Id)
$sensitiveTypesValue = $ruleobject.Condition.SubConditions[$index].Value.Groups.Sensitivetypes
foreach ($stype in $sensitiveTypesValue)
{
if ($null -ne $stype.Id)
{
$stype.Id = $null
}
}
}
}

Expand Down Expand Up @@ -924,7 +931,7 @@ function Set-TargetResource
$CreationParams.Remove('AccessTokens') | Out-Null

Write-Verbose -Message "Calling New-DLPComplianceRule with Values: $(Convert-M365DscHashtableToString -Hashtable $CreationParams)"
New-DLPComplianceRule @CreationParams
New-DLPComplianceRule @CreationParams -Confirm:$false
}
elseif (('Present' -eq $Ensure) -and ('Present' -eq $CurrentRule.Ensure))
{
Expand Down Expand Up @@ -991,7 +998,7 @@ function Set-TargetResource
$UpdateParams.Remove('AccessTokens') | Out-Null

Write-Verbose "Updating Rule with values: $(Convert-M365DscHashtableToString -Hashtable $UpdateParams)"
Set-DLPComplianceRule @UpdateParams
Set-DLPComplianceRule @UpdateParams -Confirm:$false
}
elseif (('Absent' -eq $Ensure) -and ('Present' -eq $CurrentRule.Ensure))
{
Expand Down
6 changes: 3 additions & 3 deletions Modules/Microsoft365DSC/Dependencies/Manifest.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@
},
@{
ModuleName = 'Microsoft.PowerApps.Administration.PowerShell'
RequiredVersion = '2.0.203'
RequiredVersion = '2.0.205'
},
@{
ModuleName = 'MicrosoftTeams'
RequiredVersion = '6.7.0'
RequiredVersion = '6.8.0'
},
@{
ModuleName = "MSCloudLoginAssistant"
RequiredVersion = "1.1.34"
RequiredVersion = "1.1.35"
},
@{
ModuleName = 'PnP.PowerShell'
Expand Down
21 changes: 12 additions & 9 deletions Modules/Microsoft365DSC/Microsoft365DSC.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 2025-01-29
# Generated on: 2025-01-31

@{

# Script module or binary module file associated with this manifest.
# RootModule = ''

# Version number of this module.
ModuleVersion = '1.25.129.2'
ModuleVersion = '1.25.129.3'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -147,13 +147,16 @@
IconUri = 'https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/Dependencies/Images/Logo.png?raw=true'

# ReleaseNotes of this module
ReleaseNotes = '* M365DSCRuleEvaluation
* Only provide the ManagedIdentity parameter for resources which supports it.
* SCDLPComplianceRule
* Added the comments property on creation.
* SCPolicyConfig
* Changed parsing logic to account for $null or missing properties in the
API response.'
ReleaseNotes = '* EXOMigrationEndpoint
* Added support for EntpointType value of ExchangeRemoteMove.
* M365DSCRuleEvaluation
* Changed logic to evaluate cases where the rule results in no results.
* SPDLPComplianceRule
* Fix for the SensitiveInfoType ID cleaning logic in Get-TargetResource.
* DEPENDENCIES
* Updated Microsoft.PowerApps.Administration.PowerShell to version 2.0.205.
* Updated MicrosoftTeams to version 6.8.0.
* Updated MSCloudLoginAssistant to version 1.1.35.'

# Flag to indicate whether the module requires explicit user acceptance for install/update
# RequireLicenseAcceptance = $false
Expand Down
Loading