Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrectly formatted JSON for Windows 10 MDM Policies #1

Closed
embrionic-mike opened this issue Jun 30, 2021 · 1 comment
Closed

Incorrectly formatted JSON for Windows 10 MDM Policies #1

embrionic-mike opened this issue Jun 30, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@embrionic-mike
Copy link

The Windows 10 MDM Policies for AppLocker, Internet Explorer and Chrome do not import as the JSON in the policies is incorrectly formatted. The files are missing the Windows 10 Custom Configuration parent for the OMA settings and therefore fail to import with the error:

Response content:
{"error":{"code":"ModelValidationFailure","message":"Cannot create an abstract class.","innerError":{"message":"Cannot create an abstract class.","date":"2021-06-30T10:55:32","request-id":"2aff32fb-02a0-40cb-831f-3964852057cd","client-request-id":"2aff32fb-02a0-40cb-831f-3964852057cd"}}}
Add-DeviceConfigurationPolicy : Request to https://graph.microsoft.com/v1.0/deviceManagement/deviceConfigurations
failed with HTTP Status BadRequest Bad Request
At C:\Users\SomeUser\SomePath
\Intune\DeviceConfiguration_Import_FromJSON.ps1:343 char:1

  • Add-DeviceConfigurationPolicy -JSON $JSON_Output
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Add-DeviceConfigurationPolicy
    
    

The JSON should follow the guidance in https://docs.microsoft.com/en-us/graph/api/intune-deviceconfig-windows10customconfiguration-create?view=graph-rest-1.0.

@danu-ncsc danu-ncsc added the bug Something isn't working label Jun 30, 2021
@AdamF1
Copy link
Contributor

AdamF1 commented Jul 1, 2021

Hey, thanks for reporting this! This is now fixed in fe41c30 and will be included in a new release shortly

@AdamF1 AdamF1 closed this as completed Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants