Description
Description of the issue
I am deploying the following code within an Azure DevOps pipeline, I ran an export of Intune Settings and used this as my baseline but noticed after running compliancy checks that they were failing as the bottom 4 settings are not deployed.
IntuneAntivirusPolicyWindows10SettingCatalog "IntuneAntivirusPolicyWindows10SettingCatalog-Baseline - Default Microsoft Defender Antivirus Policy - Windows"
{
allowarchivescanning = "1";
allowbehaviormonitoring = "1";
allowcloudprotection = "1";
allowfullscanonmappednetworkdrives = "1";
allowfullscanremovabledrivescanning = "1";
allowintrusionpreventionsystem = "1";
allowioavprotection = "1";
allowrealtimemonitoring = "1";
allowscanningnetworkfiles = "1";
allowscriptscanning = "1";
allowuseruiaccess = "0";
ApplicationId = $ApplicationId
Assignments = @();
avgcpuloadfactor = 30;
CertificateThumbprint = $Thumbprint
checkforsignaturesbeforerunningscan = "1";
cloudblocklevel = "0";
Description = "";
disablecatchupfullscan = "1";
disablecatchupquickscan = "1";
DisplayName = "Baseline - Default Microsoft Defender Antivirus Policy - Windows";
enablelowcpupriority = "1";
enablenetworkprotection = "2";
Ensure = "Present";
excludedextensions = @("EVT","EVTX","LOG","OST","PST");
excludedprocesses = @("Pagefile.sys");
Identity = "de641d66-bf4b-4298-b2b5-0585a76b7295";
puaprotection = "1";
realtimescandirection = "1";
scanparameter = "2";
schedulequickscantime = 120;
schedulescanday = "6";
templateId = "804339ad-1553-4478-a742-138fb5807418_1";
TenantId = $TenantId
}
All settings seem to apply ok apart from the following:
realtimescandirection = "1";
scanparameter = "2";
schedulequickscantime = 120;
schedulescanday = "6";
I should note no errors are found within the logs in the Azure DevOps pipeline, the code simply doesnt apply to the tenant.
######################################################################################
I noticed this error within event logs:
Error updating data:
{ Response status code does not indicate success: BadRequest (Bad Request). } \ at Update-IntuneDeviceConfigurationPolicy, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.23.920.2\DscResources\MSFT_IntuneAntivirusPolicyWindows10SettingCatalog\MSFT_IntuneAntivirusPolicyWindows10SettingCatalog.psm1: line 1656
\ at Set-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.23.920.2\DscResources\MSFT_IntuneAntivirusPolicyWindows10SettingCatalog\MSFT_IntuneAntivirusPolicyWindows10SettingCatalog.psm1: line 898
Within the following function MSFT_IntuneAntivirusPolicyWindows10SettingCatalog.psm1 it contains another function named Update-IntuneDeviceConfigurationPolicy, within this function it has its method set to PUT instead of PATCH.
Please can you confirm if this is expected. According to the Microsoft Docs it should be PATCH.
https://learn.microsoft.com/en-us/graph/api/intune-deviceconfigv2-devicemanagementconfigurationpolicy-update?view=graph-rest-beta
Microsoft 365 DSC Version
1.23.920.2
Which workloads are affected
other
The DSC configuration
No response
Verbose logs showing the problem
No response
Environment Information + PowerShell Version
No response
Activity