Skip to content

Commit

Permalink
Merge pull request #5678 from microsoft/Dev
Browse files Browse the repository at this point in the history
Release 1.25.122.2
  • Loading branch information
NikCharlebois authored Jan 27, 2025
2 parents a83edad + 8c01d2c commit a7fc257
Show file tree
Hide file tree
Showing 36 changed files with 1,282 additions and 585 deletions.
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
# Change log for Microsoft365DSC

# 1.25.122.2

* 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.

# 1.25.122.1

* AADConditionalAccessPolicy
Expand Down Expand Up @@ -143,6 +199,8 @@
* IntuneTrustedRootCertificateAndroidWork
* Initial Release
* MISC
* DEFENDER
* Added support for the UseBasicParsing paramter for REST calls.
* Added check to `New-M365DSCReportFromConfiguration` to make sure Windows
Remoting is enabled, which is required to convert the DSC config.
* Defender
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,20 +468,38 @@ function Export-TargetResource
$Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode `
-Results $Results

if ($Results.Reviewers.Count -gt 0)
if ($null -ne $Results.Reviewers)
{
$Results.Reviewers = Get-M365DSCAzureADAAdminConsentPolicyReviewerAsString $Results.Reviewers
$complexMapping = @(
@{
Name = 'Reviewers'
CimInstanceName = 'AADAdminConsentRequestPolicyReviewer'
IsRequired = $False
}
)
$complexTypeStringResult = Get-M365DSCDRGComplexTypeToString `
-ComplexObject $Results.Reviewers `
-CIMInstanceName 'AADAdminConsentRequestPolicyReviewer' `
-ComplexTypeMapping $complexMapping

if (-Not [String]::IsNullOrWhiteSpace($complexTypeStringResult))
{
$Results.Reviewers = $complexTypeStringResult
}
else
{
$Results.Remove('Reviewers') | Out-Null
}
}

$currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName `
-ConnectionMode $ConnectionMode `
-ModulePath $PSScriptRoot `
-Results $Results `
-Credential $Credential

if ($Results.Reviewers)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'Reviewers' -IsCIMArray:$true
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'Reviewers' -IsCIMArray:$True
}
$dscContent += $currentDSCBlock
Save-M365DSCPartialExport -Content $currentDSCBlock `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,23 +472,182 @@ function Export-TargetResource

if ($null -ne $Results.B2BCollaborationInbound)
{
$Results.B2BCollaborationInbound = Get-M365DSCAADCrossTenantAccessPolicyB2BSettingAsString -Setting $Results.B2BCollaborationInbound
$complexMapping = @(
@{
Name = 'B2BCollaborationInbound'
CimInstanceName = 'AADCrossTenantAccessPolicyB2BSetting'
IsRequired = $False
},
@{
Name = 'Applications'
CimInstanceName = 'AADCrossTenantAccessPolicyTargetConfiguration'
IsRequired = $False
},
@{
Name = 'UsersAndGroups'
CimInstanceName = 'AADCrossTenantAccessPolicyTargetConfiguration'
IsRequired = $False
},
@{
Name = 'Targets'
CimInstanceName = 'AADCrossTenantAccessPolicyTarget'
IsRequired = $False
}
)
$complexTypeStringResult = Get-M365DSCDRGComplexTypeToString `
-ComplexObject $Results.B2BCollaborationInbound `
-CIMInstanceName 'AADCrossTenantAccessPolicyB2BSetting' `
-ComplexTypeMapping $complexMapping

if (-Not [String]::IsNullOrWhiteSpace($complexTypeStringResult))
{
$Results.B2BCollaborationInbound = $complexTypeStringResult
}
else
{
$Results.Remove('B2BCollaborationInbound') | Out-Null
}
}

if ($null -ne $Results.B2BCollaborationOutbound)
{
$Results.B2BCollaborationOutbound = Get-M365DSCAADCrossTenantAccessPolicyB2BSettingAsString -Setting $Results.B2BCollaborationOutbound
$complexMapping = @(
@{
Name = 'B2BCollaborationInbound'
CimInstanceName = 'AADCrossTenantAccessPolicyB2BSetting'
IsRequired = $False
},
@{
Name = 'Applications'
CimInstanceName = 'AADCrossTenantAccessPolicyTargetConfiguration'
IsRequired = $False
},
@{
Name = 'UsersAndGroups'
CimInstanceName = 'AADCrossTenantAccessPolicyTargetConfiguration'
IsRequired = $False
},
@{
Name = 'Targets'
CimInstanceName = 'AADCrossTenantAccessPolicyTarget'
IsRequired = $False
}
)
$complexTypeStringResult = Get-M365DSCDRGComplexTypeToString `
-ComplexObject $Results.B2BCollaborationOutbound `
-CIMInstanceName 'AADCrossTenantAccessPolicyB2BSetting' `
-ComplexTypeMapping $complexMapping

if (-Not [String]::IsNullOrWhiteSpace($complexTypeStringResult))
{
$Results.B2BCollaborationOutbound = $complexTypeStringResult
}
else
{
$Results.Remove('B2BCollaborationOutbound') | Out-Null
}
}

if ($null -ne $Results.B2BDirectConnectInbound)
{
$Results.B2BDirectConnectInbound = Get-M365DSCAADCrossTenantAccessPolicyB2BSettingAsString -Setting $Results.B2BDirectConnectInbound
$complexMapping = @(
@{
Name = 'B2BCollaborationInbound'
CimInstanceName = 'AADCrossTenantAccessPolicyB2BSetting'
IsRequired = $False
},
@{
Name = 'Applications'
CimInstanceName = 'AADCrossTenantAccessPolicyTargetConfiguration'
IsRequired = $False
},
@{
Name = 'UsersAndGroups'
CimInstanceName = 'AADCrossTenantAccessPolicyTargetConfiguration'
IsRequired = $False
},
@{
Name = 'Targets'
CimInstanceName = 'AADCrossTenantAccessPolicyTarget'
IsRequired = $False
}
)
$complexTypeStringResult = Get-M365DSCDRGComplexTypeToString `
-ComplexObject $Results.B2BDirectConnectInbound `
-CIMInstanceName 'AADCrossTenantAccessPolicyB2BSetting' `
-ComplexTypeMapping $complexMapping

if (-Not [String]::IsNullOrWhiteSpace($complexTypeStringResult))
{
$Results.B2BDirectConnectInbound = $complexTypeStringResult
}
else
{
$Results.Remove('B2BDirectConnectInbound') | Out-Null
}
}

if ($null -ne $Results.B2BDirectConnectOutbound)
{
$Results.B2BDirectConnectOutbound = Get-M365DSCAADCrossTenantAccessPolicyB2BSettingAsString -Setting $Results.B2BDirectConnectOutbound
$complexMapping = @(
@{
Name = 'B2BCollaborationInbound'
CimInstanceName = 'AADCrossTenantAccessPolicyB2BSetting'
IsRequired = $False
},
@{
Name = 'Applications'
CimInstanceName = 'AADCrossTenantAccessPolicyTargetConfiguration'
IsRequired = $False
},
@{
Name = 'UsersAndGroups'
CimInstanceName = 'AADCrossTenantAccessPolicyTargetConfiguration'
IsRequired = $False
},
@{
Name = 'Targets'
CimInstanceName = 'AADCrossTenantAccessPolicyTarget'
IsRequired = $False
}
)
$complexTypeStringResult = Get-M365DSCDRGComplexTypeToString `
-ComplexObject $Results.B2BDirectConnectOutbound `
-CIMInstanceName 'AADCrossTenantAccessPolicyB2BSetting' `
-ComplexTypeMapping $complexMapping

if (-Not [String]::IsNullOrWhiteSpace($complexTypeStringResult))
{
$Results.B2BDirectConnectOutbound = $complexTypeStringResult
}
else
{
$Results.Remove('B2BDirectConnectOutbound') | Out-Null
}
}

if ($null -ne $Results.InboundTrust)
{
$Results.InboundTrust = Get-M365DSCAADCrossTenantAccessPolicyInboundTrustAsString -Setting $Results.InboundTrust
$complexMapping = @(
@{
Name = 'InboundTrust'
CimInstanceName = 'AADCrossTenantAccessPolicyInboundTrust'
IsRequired = $False
}
)
$complexTypeStringResult = Get-M365DSCDRGComplexTypeToString `
-ComplexObject $Results.InboundTrust `
-CIMInstanceName 'AADCrossTenantAccessPolicyInboundTrust' `
-ComplexTypeMapping $complexMapping

if (-Not [String]::IsNullOrWhiteSpace($complexTypeStringResult))
{
$Results.InboundTrust = $complexTypeStringResult
}
else
{
$Results.Remove('InboundTrust') | Out-Null
}
}

$currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName `
Expand All @@ -497,30 +656,25 @@ function Export-TargetResource
-Results $Results `
-Credential $Credential

if ($null -ne $Results.B2BCollaborationInbound)
if ($Results.B2BCollaborationInbound)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock `
-ParameterName 'B2BCollaborationInbound'
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'B2BCollaborationInbound' -IsCIMArray:$True
}
if ($null -ne $Results.B2BCollaborationOutbound)
if ($Results.B2BCollaborationOutbound)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock `
-ParameterName 'B2BCollaborationOutbound'
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'B2BCollaborationOutbound' -IsCIMArray:$True
}
if ($null -ne $Results.B2BDirectConnectInbound)
if ($Results.B2BDirectConnectInbound)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock `
-ParameterName 'B2BDirectConnectInbound'
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'B2BDirectConnectInbound' -IsCIMArray:$True
}
if ($null -ne $Results.B2BDirectConnectOutbound)
if ($Results.B2BDirectConnectOutbound)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock `
-ParameterName 'B2BDirectConnectOutbound'
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'B2BDirectConnectOutbound' -IsCIMArray:$True
}
if ($null -ne $Results.InboundTrust)
if ($Results.InboundTrust)
{
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock `
-ParameterName 'InboundTrust'
$currentDSCBlock = Convert-DSCStringParamToVariable -DSCBlock $currentDSCBlock -ParameterName 'InboundTrust' -IsCIMArray:$True
}

# Fix OrganizationName variable in CIMInstance
Expand Down
Loading

0 comments on commit a7fc257

Please sign in to comment.