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.219.3 #5841

Merged
merged 38 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
37cd2b7
Add ReportChatMessageEnabled, ReportChatMessageToCustomizedAddressEna…
JuliusRauschen Feb 19, 2025
222614c
Merge branch 'Dev' into report-submission-policy-new-params
JuliusRauschen Feb 19, 2025
04411ef
Merge branch 'Dev' into report-submission-policy-new-params
NikCharlebois Feb 20, 2025
7eb5dec
Add placeholder descriptions to EXOReportSubmissionPolicy.schema.mof
JuliusRauschen Feb 20, 2025
5e34a03
Updated SC export functions to force authentication
ykuijs Feb 21, 2025
248b59f
Updated changelog
ykuijs Feb 21, 2025
56013c0
Add Intune Device Compliance Script for Windows10 resource
Feb 21, 2025
13db5a3
EXODistributionGroup - Fixed the Ability to Set Members
NikCharlebois Feb 21, 2025
5b22284
Update MSFT_EXODistributionGroup.psm1
NikCharlebois Feb 21, 2025
5d5dde7
Update
NikCharlebois Feb 21, 2025
b3e20ae
Updates to SCPolicyConfig handling of default values
NikCharlebois Feb 21, 2025
5e64ba4
Update Microsoft365DSC.SCPolicyConfig.Tests.ps1
NikCharlebois Feb 21, 2025
6f613f7
Merge pull request #5827 from NikCharlebois/EXODistributionGroup-Fix
NikCharlebois Feb 21, 2025
c65bd22
Updated Resources and Cmdlet documentation pages
NikCharlebois Feb 21, 2025
ee80efe
Updated Schema Definition
NikCharlebois Feb 21, 2025
e279755
AADApplication - Fix ReplyUrls Removal
NikCharlebois Feb 21, 2025
bae86f1
Merge pull request #5830 from NikCharlebois/AADApplication
NikCharlebois Feb 21, 2025
485d683
Merge branch 'Dev' into Dev
ykuijs Feb 22, 2025
e4112d9
Merge pull request #5825 from ykuijs/Dev
ykuijs Feb 22, 2025
d4d8d08
Merge branch 'Dev' into feat/device-compliance-script-windows10
FabienTschanz Feb 24, 2025
3fd4329
Merge pull request #5826 from FabienTschanz/feat/device-compliance-sc…
NikCharlebois Feb 24, 2025
5697213
Merge pull request #5806 from JuliusRauschen/report-submission-policy…
NikCharlebois Feb 24, 2025
94380c1
Updated Resources and Cmdlet documentation pages
NikCharlebois Feb 24, 2025
c5a1559
Updated Resources and Cmdlet documentation pages
NikCharlebois Feb 24, 2025
f08430d
Updated Schema Definition
NikCharlebois Feb 24, 2025
f30b2f7
Updated {Create} Intune Integration Tests
NikCharlebois Feb 24, 2025
3fe3a28
Various EXO fixes
NikCharlebois Feb 24, 2025
afb688a
Update CHANGELOG.md
NikCharlebois Feb 24, 2025
5c1358b
Fixes Unit Tests
NikCharlebois Feb 24, 2025
c4eb342
Merge pull request #5834 from NikCharlebois/Various-EXO-fixes
NikCharlebois Feb 24, 2025
d0965fc
Various AAD Fixes
NikCharlebois Feb 24, 2025
627988d
Updated Schema Definition
NikCharlebois Feb 24, 2025
d85b793
AAD Fixes
NikCharlebois Feb 24, 2025
a7409a3
Merge pull request #5835 from NikCharlebois/Various-EXO-fixes
NikCharlebois Feb 24, 2025
1e08444
Updated Dependencies
NikCharlebois Feb 25, 2025
b1329fd
Fixes for caching
NikCharlebois Feb 26, 2025
46db79b
Release 1.25.219.3
NikCharlebois Feb 26, 2025
b541663
Merge pull request #5840 from NikCharlebois/Updated-Dependencies
NikCharlebois Feb 26, 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
46 changes: 45 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,48 @@
# Change log for Microsoft365DSC

# 1.25.219.1
# 1.25.219.3

* AADApplication
* Fixed an issue where specifying an empty ReplyURLs array would not remove
the existing entries.
* AADAuthenticationMethodPolicy
* DEPRECATED - PolicyMigrationState property is now deprecated since it
* AADAuthenticationMethodPolicyFido2
* Fixed issue where the Set-TargetResource was throwing an internal server
error.
* AADConditionalAccessPolicy
* Added check to ensure the cached policy (export) is the current policy when
evaluating in the Get-TargetResource function.
* EXOCalendarProcessing
* Changed the Get-TargetResource logic to return UPN instead of id.
* EXODistributionGroup
* Fixed the ability to set members.
* EXOGroupSettings
* Removed Id from being evaluated in the Test-TargetResource function.
* EXOMailboxAutoReplyConfiguration
* Changed the Get-TargetResource logic to return UPN instead of Identity.
* EXOMailboxCalendarFolder
* Changed the Get-TargetResource logic to return UPN instead of id.
* EXOMailboxPermission
* Changed the Get-TargetResource logic to return UPN instead of id.
* EXOSweepRule
* Changed the Get-TargetResource logic to return UPN instead of id.
* IntuneDeviceComplianceScriptWindows10
* Initial release.
* M365DSCRuleEvaluation
* Clear the cached instances from the export operation after evaluating the rules.
* Security & Compliance
* Updated export functions to remove skipping of loading module, to prevent
missing cmdlet errors that are causing failing exports.
* SCPolicyConfig
* Handle default values in the Get-TargetResource function.
* Added support for the FileCopiedToCloudFullUrlEnabled property.
* DEPENDENCIES
* Updated ExchangeOnlineManagement to version 3.7.1.
* Updated Microsoft.Graph to version 2.26.1.
* Updated MSCloudLoginAssistant to version1 1.1.38.

# 1.25.219.2

* AADAccessReviewPolicy
* Missing AccessReview permission for Application Read access
Expand Down Expand Up @@ -29,6 +71,8 @@
values.
* EXODistributionGroup
* Changed logic to retrieve existing members by UserPrincipalName.
* EXOReportSubmissionPolicy
* Add ReportChatMessageEnabled, ReportChatMessageToCustomizedAddressEnabled
* EXORoleGroup
* Evaluating assigned users based on UPN and not just on DisplayName if they
have an associated mailbox.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -799,19 +799,21 @@ function Set-TargetResource
$currentParameters.Add('Api', $apiValue)
}

if ($ReplyUrls -or $LogoutURL -or $Homepage)
if ($PSBoundParameters.ContainsKey('ReplyUrls') -or `
$PSBoundParameters.ContainsKey('LogoutURL') -or `
$PSBoundParameters.ContainsKey('Homepage'))
{
$webValue = @{}

if ($ReplyUrls)
if ($PSBoundParameters.ContainsKey('ReplyUrls'))
{
$webValue.Add('RedirectUris', $currentParameters.ReplyURLs)
}
if ($LogoutURL)
if ($PSBoundParameters.ContainsKey('LogoutURL'))
{
$webValue.Add('LogoutUrl', $currentParameters.LogoutURL)
}
if ($Homepage)
if ($PSBoundParameters.ContainsKey('Homepage'))
{
$webValue.Add('HomePageUrl', $currentParameters.Homepage)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,19 +246,11 @@ function Get-TargetResource
}
#endregion

#region resource generator code
$enumPolicyMigrationState = $null
if ($null -ne $getValue.PolicyMigrationState)
{
$enumPolicyMigrationState = $getValue.PolicyMigrationState.ToString()
}
#endregion

$results = @{
#region resource generator code
Description = $getValue.Description
DisplayName = $getValue.DisplayName
PolicyMigrationState = $enumPolicyMigrationState
#PolicyMigrationState = $enumPolicyMigrationState #DEPRECATED - Cannot be set
PolicyVersion = $getValue.PolicyVersion
ReconfirmationInDays = $getValue.ReconfirmationInDays
RegistrationEnforcement = $complexRegistrationEnforcement
Expand Down Expand Up @@ -405,6 +397,13 @@ function Set-TargetResource
$UpdateParameters.$key = Convert-M365DSCDRGComplexTypeToHashtable -ComplexObject $UpdateParameters.$key
}
}

if (-not [System.String]::IsNullOrEmpty($PolicyMigrationState))
{
Write-Verbose -Message "DEPRECATED - Property PolicyMigrationState cannot be set."
$UpdateParameters.Remove('PolicyMigrationState') | Out-Null
}

#region resource generator code
$UpdateParameters.Add('@odata.type', '#microsoft.graph.AuthenticationMethodsPolicy')
Write-Verbose -Message "Updating AuthenticationMethodPolicy with: `r`n$(Convert-M365DscHashtableToString -Hashtable $UpdateParameters)"
Expand Down Expand Up @@ -534,6 +533,7 @@ function Test-TargetResource
}

$ValuesToCheck.remove('Id') | Out-Null
$ValuesToCheck.remove('PolicyMigrationState') | Out-Null

Write-Verbose -Message "Current Values: $(Convert-M365DscHashtableToString -Hashtable $CurrentValues)"
Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $ValuesToCheck)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ function Set-TargetResource
}
}
#region resource generator code
Write-Verbose -Message "Parameters:`r`n$(ConvertTo-Json $UpdateParameters -Depth 10)"
$UpdateParameters.Add('@odata.type', '#microsoft.graph.microsoftAuthenticatorAuthenticationMethodConfiguration')
Update-MgBetaPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration `
-AuthenticationMethodConfigurationId $currentInstance.Id `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,6 @@ function Set-TargetResource
$UpdateParameters = ([Hashtable]$BoundParameters).clone()
$UpdateParameters = Rename-M365DSCCimInstanceParameter -Properties $UpdateParameters

$UpdateParameters.Remove('Id') | Out-Null

$keys = (([Hashtable]$UpdateParameters).clone()).Keys
foreach ($key in $keys)
{
Expand Down Expand Up @@ -378,7 +376,7 @@ function Set-TargetResource
}
}
#region resource generator code
$UpdateParameters.Add('@odata.type', '#microsoft.graph.fido2AuthenticationMethodConfiguration')
Write-Verbose -Message "Parameters:`r`n$(ConvertTo-Json $UpdateParameters -Depth 10)"
Update-MgBetaPolicyAuthenticationMethodPolicyAuthenticationMethodConfiguration `
-AuthenticationMethodConfigurationId $currentInstance.Id `
-BodyParameter $UpdateParameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ function Get-TargetResource
$AccessTokens
)

if (-not $Script:exportedInstance)
if (-not $Script:exportedInstance -or $Script:exportedInstance.DisplayName -ne $DisplayName)
{
Write-Verbose -Message 'Getting configuration of AzureAD Conditional Access Policy'
$ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' `
Expand Down Expand Up @@ -319,6 +319,7 @@ function Get-TargetResource
}
else
{
Write-Verbose -Message "Using cached policy {$($Script:exportedInstance.DisplayName)}"
$Policy = $Script:exportedInstance
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function Get-TargetResource
}

$result = @{
Identity = $calendarProc.Identity
Identity = $Identity
AddAdditionalResponse = $calendarProc.AddAdditionalResponse
AdditionalResponse = $calendarProc.AdditionalResponse
AddNewRequestsTentatively = $calendarProc.AddNewRequestsTentatively
Expand Down Expand Up @@ -906,7 +906,7 @@ function Export-TargetResource
$Global:M365DSCExportResourceInstancesCount++
}

Write-Host " |---[$i/$($mailboxes.Count)] $($mailbox.Identity.Split('-')[0])" -NoNewline
Write-Host " |---[$i/$($mailboxes.Count)] $($mailbox.UserPrincipalName)" -NoNewline
$Params = @{
Identity = $mailbox.UserPrincipalName
Credential = $Credential
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,41 @@ function Set-TargetResource
}
$currentParameters.Remove('OrganizationalUnit') | Out-Null
$currentParameters.Remove('Type') | Out-Null
$currentParameters.Remove('Members') | Out-Null

# Members
if ($null -ne $Members)
{
$membersDiff = Compare-Object -ReferenceObject $currentDistributionGroup.Members -DifferenceObject $Members
$membersToAdd = @()
$membersToRemove = @()
foreach ($difference in $membersDiff)
{
if ($difference.SideIndicator -eq '=>')
{
$membersToAdd += $difference.InputObject
}
elseif ($difference.SideIndicator -eq '<=')
{
$membersToRemove += $difference.InputObject
}
}

foreach ($member in $membersToAdd)
{
Write-Verbose -Message "Adding member {$member}"
Add-DistributionGroupMember -Identity $Identity -Member $member -BypassSecurityGroupManagerCheck
}
foreach ($member in $membersToRemove)
{
Write-Verbose -Message "Removing member {$member}"
Remove-DistributionGroupMember -Identity $Identity `
-Member $member `
-BypassSecurityGroupManagerCheck `
-Confirm:$false
}
$currentParameters.Remove('Members') | Out-Null
}


if ($EmailAddresses.Length -gt 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@ function Test-TargetResource
Write-Verbose -Message "Current Values: $(Convert-M365DscHashtableToString -Hashtable $CurrentValues)"
Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)"
$ValuesToCheck = $PSBoundParameters
$ValuesToCheck.Remove('Id') | Out-Null
$TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues `
-Source $($MyInvocation.MyCommand.Source) `
-DesiredValues $PSBoundParameters `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function Get-TargetResource
{
$ownerValue = Get-User -Identity $config.Identity
$result = @{
Identity = $config.Identity
Identity = $ownerValue.UserPrincipalName
Owner = $ownerValue.UserPrincipalName
AutoDeclineFutureRequestsWhenOOF = [Boolean]$config.AutoDeclineFutureRequestsWhenOOF
AutoReplyState = $config.AutoReplyState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ function Get-TargetResource

try
{
$IdentityParts = $Identity.Split(':')
$userInfo = Get-User -Identity $IdentityParts[0]
$IdentityValue = $userInfo.UserPrincipalName + ":" + $IdentityParts[1]
$folder = Get-MailboxCalendarFolder -Identity $Identity -ErrorAction SilentlyContinue

if ($null -eq $folder)
Expand All @@ -111,7 +114,7 @@ function Get-TargetResource
}

$result = @{
Identity = $folder.Identity
Identity = $IdentityValue
DetailLevel = $folder.DetailLevel
PublishDateRangeFrom = $folder.PublishDateRangeFrom
PublishDateRangeTo = $folder.PublishDateRangeTo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,9 @@ function Get-TargetResource
Ensure = 'Absent'
}

[Array]$permission = Get-MailboxPermission -Identity $Identity -ErrorAction Stop
[Array]$permissions = Get-MailboxPermission -Identity $Identity -ErrorAction Stop

if ($permission.Length -gt 1)
{
$permission = $permission | Where-Object -FilterScript { $_.User -eq $User -and (Compare-Object -ReferenceObject $_.AccessRights.Replace(' ', '').Split(',') -DifferenceObject $AccessRights).Count -eq 0 }
}

if ($permission.Length -gt 1)
{
$permission = $permission[0]
}
$permission = $permissions | Where-Object -FilterScript { $_.User -eq $User -and (Compare-Object -ReferenceObject $_.AccessRights.Replace(' ', '').Split(',') -DifferenceObject $AccessRights).Count -eq 0 }

if ($null -eq $permission)
{
Expand All @@ -117,8 +109,10 @@ function Get-TargetResource
$permission = $Script:exportedInstance
}

$userInfo = Get-User -Identity $permission.Identity

$result = @{
Identity = $permission.Identity
Identity = $userInfo.UserPrincipalName
AccessRights = [Array]$permission.AccessRights.Replace(' ', '').Split(',')
InheritanceType = $permission.InheritanceType
Owner = $permission.Owner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ function Get-TargetResource
[System.String[]]
$ThirdPartyReportAddresses = @(),

[Parameter()]
[System.Boolean]
$ReportChatMessageEnabled,

[Parameter()]
[System.Boolean]
$ReportChatMessageToCustomizedAddressEnabled,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
Expand Down Expand Up @@ -209,6 +217,8 @@ function Get-TargetResource
ReportPhishAddresses = $ReportSubmissionPolicy.ReportPhishAddresses
ReportPhishToCustomizedAddress = $ReportSubmissionPolicy.ReportPhishToCustomizedAddress
ThirdPartyReportAddresses = $ReportSubmissionPolicy.ThirdPartyReportAddresses
ReportChatMessageEnabled = $ReportSubmissionPolicy.ReportChatMessageEnabled
ReportChatMessageToCustomizedAddressEnabled = $ReportSubmissionPolicy.ReportChatMessageToCustomizedAddressEnabled
Credential = $Credential
Ensure = 'Present'
ApplicationId = $ApplicationId
Expand Down Expand Up @@ -344,6 +354,14 @@ function Set-TargetResource
[System.String[]]
$ThirdPartyReportAddresses = @(),

[Parameter()]
[System.Boolean]
$ReportChatMessageEnabled,

[Parameter()]
[System.Boolean]
$ReportChatMessageToCustomizedAddressEnabled,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
Expand Down Expand Up @@ -538,6 +556,14 @@ function Test-TargetResource
[System.String[]]
$ThirdPartyReportAddresses = @(),

[Parameter()]
[System.Boolean]
$ReportChatMessageEnabled,

[Parameter()]
[System.Boolean]
$ReportChatMessageToCustomizedAddressEnabled,

[Parameter()]
[ValidateSet('Present', 'Absent')]
[System.String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class MSFT_EXOReportSubmissionPolicy : OMI_BaseResource
[Write, Description("The ReportPhishAddresses parameter specifies the email address of the reporting mailbox in Exchange Online to receive user reported messages in reporting in Outlook using Microsoft or third-party reporting tools in Outlook.")] String ReportPhishAddresses[];
[Write, Description("The ReportPhishToCustomizedAddress parameter specifies whether to send user reported messages from Outlook (using Microsoft or third-party reporting tools) to the reporting mailbox as part of reporting in Outlook.")] Boolean ReportPhishToCustomizedAddress;
[Write, Description("Use the ThirdPartyReportAddresses parameter to specify the email address of the reporting mailbox when you're using a third-party product for user submissions instead of reporting in Outlook.")] String ThirdPartyReportAddresses[];
[Write, Description("TBD")] Boolean ReportChatMessageEnabled;
[Write, Description("TBD")] Boolean ReportChatMessageToCustomizedAddressEnabled;
[Write, Description("Specifies if this report submission policy should exist."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Write, Description("Credentials of the Exchange Global Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
[Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,18 @@ function Get-TargetResource
return $nullResult
}

$userInfo = Get-User -Identity $instance.MailboxOwnerId

$results = @{
Name = $instance.Name
Provider = $instance.Provider
DestinationFolder = $instance.MailboxOwnerId + ':\' + $instance.DestinationFolder
DestinationFolder = $userInfo.UserPrincipalName + ':\' + $instance.DestinationFolder
Enabled = [Boolean]$instance.Enabled
KeepForDays = $instance.KeepForDays
KeepLatest = $instance.KeepLatest
Mailbox = $instance.MailboxOwnerId
Mailbox = $userInfo.UserPrincipalName
SenderName = $instance.Sender.Split('"')[1]
SourceFolder = $instance.MailboxOwnerId + ':\' + $instance.SourceFolder
SourceFolder = $userInfo.UserPrincipalName + ':\' + $instance.SourceFolder
SystemCategory = $instance.SystemCategory
Ensure = 'Present'
Credential = $Credential
Expand Down Expand Up @@ -243,6 +245,7 @@ function Set-TargetResource
Write-Verbose -Message 'Updating existing Sweep Rule.'
$instance = Get-SweepRule -Mailbox $Mailbox | Where-Object -FilterScript { $_.Name -eq $Name }
$SetParameters.Add('Identity', $instance.RuleId)
Write-Verbose -Message "Parameters:`r`n$(ConvertTo-Json $SetParameters -Depth 10)"
Set-SweepRule @SetParameters
}
# REMOVE
Expand Down
Loading
Loading