microsoft / mggraph-intune-samples

Github Repository to hold samples for the MGGraph Powershell cmdlets
MIT License
109 stars 26 forks source link

error when running either managedApppolicy_import_from_json and compliancepolicy_import_from json #11

Closed stevejmonk closed 1 month ago

stevejmonk commented 1 month ago

i can't workout whats causing this error, it happens with both scripts when trying to import a JSON exported from another tenant.

Must specify valid information for parsing in the string. Status: 400 (BadRequest) ErrorCode: ModelValidationFailure Date: 2024-07-31T10:51:52 Headers: Vary
| : Accept-Encoding Strict-Transport-Security : max-age=31536000 request-id : 21899199-926c-45ec-8fa1-2923feaff45e client-request-id
| : 1ae2c889-9753-420a-acef-fe78aac74cef x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"UK | South","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"LN2PEPF00011774"}} Date : Wed, 31 Jul 2024 10:51:52 GMT

As a comparison DeviceConfiguration_import_fromJSON works ok