Skip to content

Commit

Permalink
Merge branch 'Dev' into AzureBillingAccountPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois authored Nov 13, 2024
2 parents ff17bef + a6530b9 commit 8010d94
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 222 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
* Fixed bug where an empty value was passed in the request for the
insiderRiskLevels parameter, which throws an error.
FIXES [#5389](https://github.com/microsoft/Microsoft365DSC/issues/5389)
* Fixes a bug where 3P apps could not be assigned by DisplayName for both
IncludeApplications and ExcludeApplications
FIXES [#5390](https://github.com/microsoft/Microsoft365DSC/issues/5390)
* AADRoleEligibilityScheduleRequest
* FIXES [#3787](https://github.com/microsoft/Microsoft365DSC/issues/3787)
* FIXES [#5089](https://github.com/microsoft/Microsoft365DSC/issues/5089)
* AzureBillingAccountPolicy
* Initial release.
* EXOATPBuiltInProtectionRule, EXOEOPProtectionRule
Expand All @@ -20,6 +26,13 @@
* IntuneAntivirusPolicyWindows10SettingCatalog
* Update properties to be upper-case.
Fixes [#5373](https://github.com/microsoft/Microsoft365DSC/issues/5373)
* IntuneDeviceConfigurationCustomPolicyWindows10
* Fixed issue where `Value`, from `OmaSettings`, could not be compared
correctly if it was boolean and set to `$False`
FIXES [#5384](https://github.com/microsoft/Microsoft365DSC/issues/5384)
* IntuneEndpointDetectionAndResponsePolicyWindows10
* Remove changed property name from export.
FIXES [#5300](https://github.com/microsoft/Microsoft365DSC/issues/5300)
* IntuneSecurityBaselineMicrosoftEdge
* Deprecate property `authschemes` and replace with `AuthSchemes_AuthSchemes`
* M365DSCDRGUtil
Expand All @@ -29,7 +42,7 @@
* Add ADMX handling for `edge~httpauthentication_`.
FIXES [#5378](https://github.com/microsoft/Microsoft365DSC/issues/5378) (2/2)
* TeamsUpgradePolicy
* Changes to how we're retrieving the users to improve performance.
* Changes to how we are retrieving the users to improve performance.
* DEPENDENCIES
* Updated DSCParser to version 2.0.0.12.
* Updated MSCloudLoginAssistant to version 1.1.28.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1031,11 +1031,54 @@ function Set-TargetResource
Write-Verbose -Message 'Set-Targetresource: create Application Condition object'
if ($currentParameters.ContainsKey('IncludeApplications'))
{
$conditions.Applications.Add('includeApplications', $IncludeApplications)
$IncludeApplicationsValue = @()
foreach ($app in $IncludeApplications)
{
$ObjectGuid = [System.Guid]::empty
if ([System.Guid]::TryParse($app, [System.Management.Automation.PSReference]$ObjectGuid))
{
$IncludeApplicationsValue += $app
}
else
{
$appInfo = Get-MgApplication -Filter "DisplayName eq '$app'" -ErrorAction SilentlyContinue
if ($null -ne $appInfo)
{
$IncludeApplicationsValue += $appInfo.AppId
}
else
{
$IncludeApplicationsValue += $app
}
}
}

$conditions.Applications.Add('includeApplications', $IncludeApplicationsValue)
}
if ($currentParameters.ContainsKey('excludeApplications'))
{
$conditions.Applications.Add('excludeApplications', $ExcludeApplications)
$ExcludeApplicationsValue = @()
foreach ($app in $ExcludeApplications)
{
$ObjectGuid = [System.Guid]::empty
if ([System.Guid]::TryParse($app, [System.Management.Automation.PSReference]$ObjectGuid))
{
$ExcludeApplicationsValue += $app
}
else
{
$appInfo = Get-MgApplication -Filter "DisplayName eq '$app'" -ErrorAction SilentlyContinue
if ($null -ne $appInfo)
{
$ExcludeApplicationsValue += $appInfo.AppId
}
else
{
$ExcludeApplicationsValue += $app
}
}
}
$conditions.Applications.Add('excludeApplications', $ExcludeApplicationsValue)
}
if ($ApplicationsFilter -and $ApplicationsFilterMode)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
$schedule = $instance
}
}
[Array]$request = Get-MgBetaRoleManagementDirectoryRoleEligibilityScheduleRequest -Filter "PrincipalId eq '$PrincipalId' and RoleDefinitionId eq '$($schedule.RoleDefinitionId)'" | Sort-Object -Property CompletedDateTime -Descending
[Array]$request = Get-MgBetaRoleManagementDirectoryRoleEligibilityScheduleRequest -Filter "PrincipalId eq '$PrincipalId'" | Where-Object -FilterScript {$_.RoleDefinitionId -eq $schedule.RoleDefinitionId} | Sort-Object -Property CompletedDateTime -Descending
`
if ($request.Length -gt 1)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ function Get-TargetResource

if ($currentomaSettings.isEncrypted -eq $true)
{
write-verbose ("IsEncrypted = true -- $($currentomaSettings.displayName)")
$SecretReferenceValueId = $currentomaSettings.secretReferenceValueId
$OmaSettingPlainTextValue = Get-OmaSettingPlainTextValue -SecretReferenceValueId $SecretReferenceValueId
if (![String]::IsNullOrEmpty($OmaSettingPlainTextValue))
Expand All @@ -144,7 +143,7 @@ function Get-TargetResource
$myomaSettings.Add('IsEncrypted', $currentomaSettings.isEncrypted)
$myomaSettings.Add('OmaUri', $currentomaSettings.omaUri)
$myomaSettings.Add('FileName', $currentomaSettings.fileName)
$myomaSettings.Add('Value', $currentomaSettings.value)
$myomaSettings.Add('Value', [System.String]$currentomaSettings.value)
if ($currentomaSettings.'@odata.type' -eq '#microsoft.graph.omaSettingInteger')
{
$myomaSettings.Add('IsReadOnly', $currentomaSettings.isReadOnly)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ function Get-TargetResource
[array]$settings = Get-MgBetaDeviceManagementConfigurationPolicySetting `
-DeviceManagementConfigurationPolicyId $Identity `
-ExpandProperty 'settingDefinitions' `
-All `
-ErrorAction Stop

$policySettings = @{}
Expand All @@ -130,7 +131,7 @@ function Get-TargetResource
$policySettings.Remove('ClientConfigurationPackageType')
$policySettings.Remove('onboarding')
$policySettings.Remove('offboarding')
$policySettings.Remove('autofromconnector')
$policySettings.Remove('onboarding_fromconnector')

# Removing TelemetryReportingFrequency because it's deprecated and doesn't need to be evaluated and enforced
$policySettings.Remove('telemetryreportingfrequency')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function Get-TargetResource
[Switch]
$ManagedIdentity
)
Write-Verbose -Message 'Checking the Teams Upgrade Configuration'
Write-Verbose -Message 'Checking the Teams Org Wide App Settings'

$ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftTeams' `
-InboundParameters $PSBoundParameters
Expand Down Expand Up @@ -105,7 +105,7 @@ function Set-TargetResource
$ManagedIdentity
)

Write-Verbose -Message 'Setting Teams Upgrade Configuration'
Write-Verbose -Message 'Setting the Teams Org Wide App Settings'

#Ensure the proper dependencies are installed in the current environment.
Confirm-M365DSCDependencies
Expand Down Expand Up @@ -169,7 +169,7 @@ function Test-TargetResource
Add-M365DSCTelemetryEvent -Data $data
#endregion

Write-Verbose -Message 'Testing configuration of Team Upgrade Settings'
Write-Verbose -Message 'Testing configuration for the Teams Org Wide App Settings'

$CurrentValues = Get-TargetResource @PSBoundParameters

Expand Down
Loading

0 comments on commit 8010d94

Please sign in to comment.