Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/Dev' into IntuneAssignmentGrou…
Browse files Browse the repository at this point in the history
…pDisplayName
  • Loading branch information
William-Francillette committed Feb 14, 2024
2 parents 1c44711 + 6db4774 commit 22d7cbc
Show file tree
Hide file tree
Showing 96 changed files with 3,076 additions and 641 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
82 changes: 80 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,63 @@
* Added support for assignment GroupDisplayName
* IntuneDeviceCompliancePolicyWindows10
* Added support for assignment GroupDisplayName
* AADRoleEligibilityScheduleRequest
* Fixed an issue where an error was thrown if no requests were found instead
of simply returning the Null object.
* EXOMobileDeviceMailboxPolicy
* Fixes an issue where an empty MinPasswordLength value was always passed down
to the update logic flow.
* IntuneAppConfigurationPolicy
* Added parameter Id to avoid having to retrieve the same policy multiple
times
* Fixed tests in Test-TargetResource to ensure the resource reports its
correct state
FIXES [#3542](https://github.com/microsoft/Microsoft365DSC/issues/3542)
* IntuneDeviceAndAppManagementAssignmentFilter
* Fixed Test-TargetResource to ensure that resource reports its correct state
FIXES [#3959](https://github.com/microsoft/Microsoft365DSC/issues/3959)
* IntuneDeviceConfigurationNetworkBoundaryPolicyWindows10
* Fixed Test-TargetResource by removing Id from being tested and also used
correct filter while retrieving the policy otherwise it could not be found
FIXES [#3964](https://github.com/microsoft/Microsoft365DSC/issues/3964)
* IntuneDeviceConfigurationPolicyAndroidWorkProfile
* Fix typo in variable which made it export incorrectly and report that
resource was not in correct state due to testing an incorrect value
FIXES [#3972](https://github.com/microsoft/Microsoft365DSC/issues/3972)
* DEPENDENCIES
* Updated DSCParser to version 1.4.0.2.
* Updated Microsoft.Graph dependencies to version 2.13.1.
* Updated MSCloudLoginAssistant to version 1.1.13.
* MISC
* M365DSCReport
* Fix nested change detection for CIMInstances
* Fix IntuneDeviceEnrolllmentPlatformRestriction comparison in report
FIXES [#4291](https://github.com/microsoft/Microsoft365DSC/issues/4291)

# 1.24.207.2

* TeamsAppSetupPolicy
* Changed the logic to retrieve arrays of Ids in the Get method.
* MISC
* Drift Logging
* Now includes the full list of parameters for the current values.
* Telemetry
* Added a new M365DSCTelemetryEventId parameter to track duplication of events.

# 1.24.207.1

* IntuneDeviceEnrollmentPlatformRestriction
* Added Priority parameter
FIXES [#4081](https://github.com/microsoft/Microsoft365DSC/issues/4081)
* SCDLPComplianceRule
* Properly escapes fancy quotes in the Get method.
* TeamsMeetingPolicy
* Ignore the AllowUserToJoinExternalMeeting parameterfor drift evaluation
since it doesn't do anything based on official documentation.
* DEPENDENCIES
* Updated Microsoft.PowerApps.Administration.PowerShell to version 2.0.180.
* Updated MSCloudLoginAssistant to version 1.1.11
* Updated ReverseDSC to version 2.0.0.19

# 1.24.131.2

Expand Down Expand Up @@ -56,9 +113,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 @@ -87,7 +162,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 @@ -106,7 +181,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 @@ -123,6 +198,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 22d7cbc

Please sign in to comment.