Skip to content

Commit

Permalink
Merge branch 'Dev' into mwu-Added-Parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
andikrueger authored Feb 13, 2024
2 parents e070897 + 8e0cf16 commit d5013ee
Show file tree
Hide file tree
Showing 86 changed files with 2,204 additions and 357 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/Global - Integration - AAD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ jobs:
# The type of runner that the job will run on
runs-on: windows-latest

permissions: write-all

# Only when run from the main repo
if: github.repository == 'microsoft/Microsoft365DSC'

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/Global - Integration - EXO.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ jobs:
# The type of runner that the job will run on
runs-on: windows-latest

permissions: write-all

# Only when run from the main repo
if: github.repository == 'microsoft/Microsoft365DSC'

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/Global - Integration - INTUNE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ jobs:
# The type of runner that the job will run on
runs-on: windows-latest

permissions: write-all

# Only when run from the main repo
if: github.repository == 'microsoft/Microsoft365DSC'

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/PublishGitHubPages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ jobs:
GenerateResource:
runs-on: windows-latest

permissions: write-all

# Only when run from the main repo
if: github.repository == 'microsoft/Microsoft365DSC'

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/Unit Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
# The type of runner that the job will run on
runs-on: windows-latest

permissions: write-all

# Only when run from the main repo
if: github.repository == 'microsoft/Microsoft365DSC'

Expand Down
29 changes: 25 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* EXOMobileDeviceMailboxPolicy
* Fixes an issue where an empty MinPasswordLength value was always passed down
to the update logic flow.
* DEPENDENCIES
* Updated Microsoft.Graph dependencies to version 2.13.1.
* SPOAccessControlSettings
* Added support for the ConditionalAccessPolicy parameter based on the PNP Module
* DEPENDENCIES
* Updated Microsoft.Graph dependencies to version 2.13.1.

# 1.24.207.2

Expand Down Expand Up @@ -65,9 +65,27 @@
wasn't properly returned.
* EXOSafeLinksPolicy
* Deprecated the UseTranslatedNotificationText property
* IntuneDeviceConfigurationPolicyAndroidOpenSourceProject,
IntuneExploitProtectionPolicyWindows10SettingCatalog, IntuneRoleAssignment,
IntuneRoleDefinition, IntuneSettingCatalogASRRulesPolicyWindows10,
IntuneWiFiConfigurationPolicyAndroidDeviceAdministrator,
IntuneWifiConfigurationPolicyAndroidEnterpriseDeviceOwner,
IntuneWifiConfigurationPolicyAndroidEnterpriseWorkProfile,
IntuneWifiConfigurationPolicyAndroidForWork,
IntuneWifiConfigurationPolicyAndroidOpenSourceProject,
IntuneWifiConfigurationPolicyIOS, IntuneWifiConfigurationPolicyMacOS,
IntuneWifiConfigurationPolicyWindows10, TeamsCallParkPolicy
* Fix condition in Test-TargetResource when resource is absent
FIXES [#3897](https://github.com/microsoft/Microsoft365DSC/issues/3897)
FIXES [#4256](https://github.com/microsoft/Microsoft365DSC/issues/4256)
* TeamsFilesPolicy
* Add default value ('Present') to parameter Ensure
* TeamsEmergencyCallRoutingPolicy
* Fix deletion of resource
FIXES [#4261](https://github.com/microsoft/Microsoft365DSC/issues/4261)
* TeamsUserCallingSettings
* Added support for Certificate Authentication
FIXES [#3180](https://github.com/microsoft/Microsoft365DSC/issues/3180)
* TEAMS
* Added support for ManagedIdentity Authentication across Teams resources.
* DEPENDENCIES
Expand Down Expand Up @@ -96,7 +114,7 @@
* Remove the logic path to create a new instance in favor of the update flow.
* AADConditionalAccessPolicy
* Fix issue when not all parameters are specified
FIXES [[#4202](https://github.com/microsoft/Microsoft365DSC/issues/4202)]
FIXES [#4202](https://github.com/microsoft/Microsoft365DSC/issues/4202)
* AADCrossTenantAccessPolicy
* Removed the ability to specify a value of Absent for the Ensure property.
* AADCrossTenantAccessPolicyCOnfigurationDefault
Expand All @@ -115,7 +133,7 @@
* DEPRECATED Resource.
* SCAutoSensitivityLabelRule
* Correct export indentation, which caused an issue with report conversion to JSON.
FIXES [[#4240](https://github.com/microsoft/Microsoft365DSC/issues/4240)]
FIXES [#4240](https://github.com/microsoft/Microsoft365DSC/issues/4240)
* SPOSharingSettings
* Fixed an Issue where the MySiteSharingCapability could be returned as an
empty string instead of a null value from the Get method.
Expand All @@ -132,6 +150,9 @@
* TeamsCallParkPolicy
* Fix condition in Test-TargetResource when resource is absent
FIXES [#4210](https://github.com/microsoft/Microsoft365DSC/issues/4210)
* TeamsCallQueue
* Optimize performances by doing 1 request instead of n+1
FIXES [[#4192](https://github.com/microsoft/Microsoft365DSC/issues/4192)]
* TeamsComplianceRecordingPolicy
* Fix condition in Test-TargetResource when resource is absent
FIXES [#4212](https://github.com/microsoft/Microsoft365DSC/issues/4212)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1075,10 +1075,36 @@ function Export-TargetResource
All = [switch]$true
ErrorAction = 'Stop'
}
if ($Filter -like "*endsWith*") {

# Define the list of attributes
$attributesToCheck = @(
"description",
"displayName",
"hasMembersWithLicenseErrors",
"mail",
"mailNickname",
"onPremisesSecurityIdentifier",
"onPremisesSyncEnabled",
"preferredLanguage"
)

# Initialize a flag to indicate whether any attribute matches the condition
$matchConditionFound = $false

# Check each attribute in the list
foreach ($attribute in $attributesToCheck) {
if ($Filter -like "*$attribute eq null*") {
$matchConditionFound = $true
break
}
}

# If any attribute matches, add parameters to $ExportParameters
if ($matchConditionFound -or $Filter -like "*endsWith*") {
$ExportParameters.Add('CountVariable', 'count')
$ExportParameters.Add('ConsistencyLevel', 'eventual')
}

[array] $Script:exportedGroups = Get-MgGroup @ExportParameters
$Script:exportedGroups = $Script:exportedGroups | Where-Object -FilterScript {
-not ($_.MailEnabled -and ($null -eq $_.GroupTypes -or $_.GroupTypes.Length -eq 0)) -and `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,20 @@

$schedule = Get-MgBetaRoleManagementDirectoryRoleEligibilitySchedule -Filter "PrincipalId eq '$PrincipalId' and RoleDefinitionId eq '$RoleDefinitionId'"
[Array]$request = Get-MgBetaRoleManagementDirectoryRoleEligibilityScheduleRequest -Filter "PrincipalId eq '$PrincipalId' and RoleDefinitionId eq '$RoleDefinitionId'" | Sort-Object -Property CompletedDateTime -Descending
` $request = $request[0]
`
if ($request.Length -gt 1)
{
$request = $request[0]
}
}
}
else
{
$ObjectGuid = [System.Guid]::empty
if ($PrincipalType -eq 'User')
{
{
Write-Verbose -Message "Retrieving principal {$Principal} of type {$PrincipalType}"

if ([System.Guid]::TryParse($Principal,[System.Management.Automation.PSReference]$ObjectGuid))
{
$PrincipalIdValue = Get-MgUser -UserId $Principal -ErrorAction SilentlyContinue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ function Export-TargetResource
{
$Script:ExportMode = $true
#region resource generator code
[array] $Script:exportedInstances = Get-DataClassification -ErrorAction Stop
[array] $Script:exportedInstances = Get-DataClassification -ErrorAction SilentlyContinue
$dscContent = [System.Text.StringBuilder]::new()

if ($Script:exportedInstances.Length -eq 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,7 @@ function Set-TargetResource
if ([System.String]::IsNullOrEmpty($MinPasswordLength))
{
$NewMobileDeviceMailboxPolicyParams.Remove('MinPasswordLength') | Out-Null
$SetMobileDeviceMailboxPolicyParams.Remove('MinPasswordLength') | Out-Null
}

# CASE: Mobile Device Mailbox Policy doesn't exist but should;
Expand Down
Loading

0 comments on commit d5013ee

Please sign in to comment.