Skip to content

Commit

Permalink
Merge pull request #5690 from NikCharlebois/Release-1.25.129.1
Browse files Browse the repository at this point in the history
Release 1.25.129.1
  • Loading branch information
NikCharlebois authored Jan 29, 2025
2 parents 6b11694 + 161c222 commit a2aaf5d
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 182 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Change log for Microsoft365DSC

# UNRELEASED
# 1.25.129.1

* AADRoleEligibilityScheduleRequest
* Changed the mapping logic to find Id of a custom role.
* AADServicePrincipal
* Fixes a regression issue when trying to export instances, the authentication
parameters were no longer returned by the Get-TargetResource function.
* IntuneDeviceConfigurationPolicyiOS
* Fixes [#5594] https://github.com/microsoft/Microsoft365DSC/issues/5594
* MISC
* AAD Workload
* Improved performance of various resources during export.
Expand Down Expand Up @@ -104,8 +106,6 @@
* Fix values that have a zero length whitespace character.
* IntuneAppProtectionPolicyiOS
* Fixes [#5589] https://github.com/microsoft/Microsoft365DSC/issues/5589
* IntuneDeviceConfigurationPolicyiOS
* Fixes [#5594] https://github.com/microsoft/Microsoft365DSC/issues/5594
* SCAutoSensitivityLabelPolicy
* Use correct parameter `DesiredValues` given to `Test-M365DSCParameterState`,
contrary to `EXOTenantAllowBlockListItems` these resources are not affected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function Get-TargetResource
$GroupId = (Get-MgGroup -Filter $Filter).Id
}
if ($Id -notmatch '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}_member_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$') {
$getId = Get-MgIdentityGovernancePrivilegedAccessGroupEligibilitySchedule `
$getId = Get-MgBetaIdentityGovernancePrivilegedAccessGroupEligibilitySchedule `
-Filter "Groupid eq '$GroupId'" `
-ErrorAction SilentlyContinue
$Id = $getId.Id
Expand Down Expand Up @@ -785,18 +785,23 @@ function Export-TargetResource
{

$groups = Get-MgGroup -Filter "MailEnabled eq false and NOT(groupTypes/any(x:x eq 'DynamicMembership'))" -Property "displayname,Id" -CountVariable CountVar -ConsistencyLevel eventual -ErrorAction Stop
$j = 1
if ($groups.Length -eq 0)
{
Write-Host $Global:M365DSCEmojiGreenCheckMark
}
else
{
Write-Host "`r`n" -NoNewline
}
foreach ($group in $groups)
{
Write-Host "get group $($group.DisplayName)"
Write-Host " |---[$j/$($groups.Count)] $($group.DisplayName)" -NoNewline
#region resource generator code
$getValue = Get-MgIdentityGovernancePrivilegedAccessGroupEligibilitySchedule `
$getValue = Get-MgBetaIdentityGovernancePrivilegedAccessGroupEligibilitySchedule `
-Filter "groupId eq '$($group.Id)'" `
-All `
-ErrorAction Stop
if($null -eq $getValue)
{
continue
}
-ErrorAction SilentlyContinue

$i = 1
$dscContent = ''
Expand All @@ -810,7 +815,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
Write-Host " |---[$i/$($getValue.Count)] $($group.DisplayName)" -NoNewline
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}
Write-Host " |---[$i/$($getValue.Count)] $($config.Id)" -NoNewline
$params = @{
Id = $config.Id
GroupDisplayName = $group.DisplayName
Expand Down Expand Up @@ -887,8 +896,9 @@ function Export-TargetResource
$i++
Write-Host $Global:M365DSCEmojiGreenCheckMark
}
return $dscContent
$j++
}
return $dscContent
}
catch
{
Expand Down
67 changes: 12 additions & 55 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-27
# Generated on: 2025-01-29

@{

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

# Version number of this module.
ModuleVersion = '1.25.122.2'
ModuleVersion = '1.25.129.1'

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

# ReleaseNotes of this module
ReleaseNotes = '* AADAdminConsentRequestPolicy
* Refactored the export to use a common CIMInstance function.
* AADCrossTenantAccessPolicyConfigurationDefault
* Refactored the export to use a common CIMInstance function.
* AADCrossTenantAccessPolicyConfigurationPartner
* Refactored the export to use a common CIMInstance function.
* AADGroup
* Refactored the export to use a common CIMInstance function.
* AADHomeRealmDiscoveryPolicy
* Refactored the export to use a common CIMInstance function.
* AADIdentityGovernanceLifecycleWorkflow
* Refactored the export to use a common CIMInstance function.
* AADNetworkAccessForwardingPolicy
* Refactored the export to use a common CIMInstance function.
* AADNetworkAccessForwardingProfile
* Refactored the export to use a common CIMInstance function.
* AADRemoteNetwork
* Refactored the export to use a common CIMInstance function.
* AADRoleAssignmentScheduleRequest
* Refactored the export to use a common CIMInstance function.
* AADRoleEligibilityScheduleRequest
* Fixed overall logic to prevent errors complaining about existing permissions.
* Refactored the export to use a common CIMInstance function.
* FabricAdminTenantSettings
* Fix titles that have a zero length whitespace character.
* IntuneAppProtectionPolicyAndroid
* Fixes an error retrieving the group id for assignment which resulted
in a 500 error when creating or updating an instance.
* IntuneAccountProtectionLocalUserGroupMembershipPolicy
* Fixes an issue where not all details were exported.
* IntuneAccountProtectionPolicy
* Fixes an issue where not all details were exported.
* IntuneAppConfigurationPolicy
* Fixes an issue with fetching a policy that does not exist.
FIXES [#5666](https://github.com/microsoft/Microsoft365DSC/issues/5666)
* IntuneApplicationControlPolicyWindows10
* Fixes an issue with fetching a policy that does not exist.
* IntuneAppProtectionPolicyAndroid
* Fixes an issue with fetching a policy that does not exist.
* IntuneDeviceEnrollmentPlatformRestriction
* Fixes an issue with fetching a policy that does not exist.
* M365DSCReverse
* Only fetch tenant name if not in correct format.
* O365SearchAndIntelligenceConfigurations
* Added support for Meeting Insights settings.
* Added support for Service Principal authentication.
* SCInsiderRiskEntityList
* Fixed trailing whitespaces in the name of some properties when attempting
to set values.
* TeamsEmergencyCallRoutingPolicy
* Refactored the export to use a common CIMInstance function.
* TeamsTenantDialPlan
* Refactored the export to use a common CIMInstance function.'
ReleaseNotes = '* AADRoleEligibilityScheduleRequest
* Changed the mapping logic to find Id of a custom role.
* AADServicePrincipal
* Fixes a regression issue when trying to export instances, the authentication
parameters were no longer returned by the Get-TargetResource function.
* IntuneDeviceConfigurationPolicyiOS
* Fixes [#5594] https://github.com/microsoft/Microsoft365DSC/issues/5594
* MISC
* AAD Workload
* Improved performance of various resources during export.'

# Flag to indicate whether the module requires explicit user acceptance for install/update
# RequireLicenseAcceptance = $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
return "Credentials"
}

Mock -CommandName Get-MgPolicyRoleManagementPolicyAssignment -MockWith {
Mock -CommandName Get-MgBetaPolicyRoleManagementPolicyAssignment -MockWith {
return @(
@{
PolicyIdId = 'FakeId'
}
)
}

Mock -CommandName Get-MgPolicyRoleManagementPolicyRule -MockWith {
Mock -CommandName Get-MgBetaPolicyRoleManagementPolicyRule -MockWith {
return @()
}

Mock -CommandName Update-MgPolicyRoleManagementPolicyRule -MockWith {
Mock -CommandName Update-MgBetaPolicyRoleManagementPolicyRule -MockWith {
return @()
}
# Mock Write-Host to hide output during the tests
Expand Down Expand Up @@ -83,7 +83,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Credential = $Credential;
}

Mock -CommandName Get-MgIdentityGovernancePrivilegedAccessGroupEligibilitySchedule -MockWith {
Mock -CommandName Get-MgBetaIdentityGovernancePrivilegedAccessGroupEligibilitySchedule -MockWith {
return $null
}

Expand Down Expand Up @@ -120,7 +120,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Credential = $Credential;
}

Mock -CommandName Get-MgIdentityGovernancePrivilegedAccessGroupEligibilitySchedule -MockWith {
Mock -CommandName Get-MgBetaIdentityGovernancePrivilegedAccessGroupEligibilitySchedule -MockWith {
return $null
}

Expand Down Expand Up @@ -182,7 +182,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Credential = $Credential;
}

Mock -CommandName Get-MgIdentityGovernancePrivilegedAccessGroupEligibilitySchedule -MockWith {
Mock -CommandName Get-MgBetaIdentityGovernancePrivilegedAccessGroupEligibilitySchedule -MockWith {
return $null
}

Expand Down Expand Up @@ -211,23 +211,23 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
return $null
}

Mock -CommandName Get-MgPolicyRoleManagementPolicyAssignment -MockWith {
Mock -CommandName Get-MgBetaPolicyRoleManagementPolicyAssignment -MockWith {
return @(
@{
PolicyId = 'FakeId'
}
)
}

Mock -CommandName Get-MgPolicyRoleManagementPolicyRule -MockWith {
Mock -CommandName Get-MgBetaPolicyRoleManagementPolicyRule -MockWith {
return @{
AdditionalProperties = @{
isExpirationRequired = $true
}
}
}

Mock -CommandName Update-MgPolicyRoleManagementPolicyRule -MockWith {
Mock -CommandName Update-MgBetaPolicyRoleManagementPolicyRule -MockWith {
return @()
}

Expand Down Expand Up @@ -255,7 +255,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Credential = $Credential;
}

Mock -CommandName Get-MgIdentityGovernancePrivilegedAccessGroupEligibilitySchedule -MockWith {
Mock -CommandName Get-MgBetaIdentityGovernancePrivilegedAccessGroupEligibilitySchedule -MockWith {
return $null
}

Expand Down Expand Up @@ -286,23 +286,23 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
return $null
}

Mock -CommandName Get-MgPolicyRoleManagementPolicyAssignment -MockWith {
Mock -CommandName Get-MgBetaPolicyRoleManagementPolicyAssignment -MockWith {
return @(
@{
PolicyId = 'FakeId'
}
)
}

Mock -CommandName Get-MgPolicyRoleManagementPolicyRule -MockWith {
Mock -CommandName Get-MgBetaPolicyRoleManagementPolicyRule -MockWith {
return @{
AdditionalProperties = @{
isExpirationRequired = $true
}
}
}

Mock -CommandName Update-MgPolicyRoleManagementPolicyRule -MockWith {
Mock -CommandName Update-MgBetaPolicyRoleManagementPolicyRule -MockWith {
return @()
}
}
Expand Down Expand Up @@ -336,7 +336,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
}
}

Mock -CommandName Get-MgIdentityGovernancePrivilegedAccessGroupEligibilitySchedule -MockWith {
Mock -CommandName Get-MgBetaIdentityGovernancePrivilegedAccessGroupEligibilitySchedule -MockWith {
return @{
Id = 'FakeStringValue'
}
Expand Down
Loading

0 comments on commit a2aaf5d

Please sign in to comment.