You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a policy manually which I then exported, config found below, then I removed it and tried to recreate but the assignment cannot be applied since it fails with Bad request on Update-DeviceConfigurationPolicyAssignment (failure not visible on CLI, only in Event Viewer).
The policy still gets created but then deploying the config again will result in error (hard failure in CLI, deployment stops) because then it tries to update it a few lines below in the code where it has another call to Update-DeviceConfigurationPolicyAssignment, which would have the same problem as above, but in this case it even fails for another reason which is calling it with $Identity which can be from another tenant (or from an already deleted policy in this case) so that chunk needs to changed to $currentCategory.Identity instead.
Error updating data:
{ Response status code does not indicate success: BadRequest (Bad Request). } \ at Update-DeviceConfigurationPolicyAssignment, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.23.1220.1\modules\M365DSCDRGUtil.psm1: line 1314
\ at Set-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.23.1220.1\DscResources\MSFT_IntuneDeviceEnrollmentPlatformRestriction\MSFT_IntuneDeviceEnrollmentPlatformRestriction.psm1: line 335
Description of the issue
I created a policy manually which I then exported, config found below, then I removed it and tried to recreate but the assignment cannot be applied since it fails with Bad request on Update-DeviceConfigurationPolicyAssignment (failure not visible on CLI, only in Event Viewer).
The policy still gets created but then deploying the config again will result in error (hard failure in CLI, deployment stops) because then it tries to update it a few lines below in the code where it has another call to Update-DeviceConfigurationPolicyAssignment, which would have the same problem as above, but in this case it even fails for another reason which is calling it with $Identity which can be from another tenant (or from an already deleted policy in this case) so that chunk needs to changed to $currentCategory.Identity instead.
Microsoft 365 DSC Version
1.23.1220.1
Which workloads are affected
other
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: