Micke-K / IntuneManagement

Copy, export, import, delete, document and compare policies and profiles in Intune and Azure with PowerShell script and WPF UI. Import ADMX files and registry settings with ADMX ingestion. View and edit PowerShell script.
MIT License
1.06k stars 190 forks source link

Importing json files is generating error #267

Open mdurini-swisscom opened 6 days ago

mdurini-swisscom commented 6 days ago

Hello, i exported some stuff from a tenant and i'm trying to import them in another one. I'm getting these errors

Failed to invoke MS Graph with URL https://graph.microsoft.com/beta/deviceManagement/configurationPolicies (Request ID: 10af5dc4-c738-4edf-bbf7-07353ebe165b). Status code: BadRequest. Response message: The request is invalid. Exception: The remote server returned an error: (400) Bad Request.

Failed to invoke MS Graph with URL https://graph.microsoft.com/beta/deviceManagement/configurationPolicies (Request ID: 81688f33-b78d-4371-ac9b-eea45ae02c7f). Status code: BadRequest. Response message: A type named 'microsoft.graph.windows10GeneralConfiguration' could not be resolved by the model. When a model is available, each type name must resolve to a valid type. Exception: The remote server returned an error: (400) Bad Request.

Failed to invoke MS Graph with URL https://graph.microsoft.com/beta/deviceManagement/configurationPolicies (Request ID: d616ca41-5582-4b75-839a-1adcabfb1280). Status code: BadRequest. Response message: A type named 'microsoft.graph.windowsQualityUpdateProfile' could not be resolved by the model. When a model is available, each type name must resolve to a valid type. Exception: The remote server returned an error: (400) Bad Request.

this is also happening for powershell scripts. what am i doing wrong?

Micke-K commented 6 days ago

Hello,

What Policy types did you try to export/import? What folder did you try to import the policies from?

Cheers!

mdurini-swisscom commented 6 days ago

hello @Micke-K , first of all thank you for your amazing job. it seems that the problem is related to the policies

the funny thing is that they failed trying the export / import options, but it's working with bulk import / bulk export....do you need other info?

Micke-K commented 6 days ago

Thank you!

That sounds like you try to import them from a non-standard folder. The folder name specifies what API to use. The Bulk Export/Import takes care of that automatically.

Can you do a manual import from a Bulk exported folder?

Cheers!

mdurini-swisscom commented 6 days ago

So, when i did the export, i used these settings image so the folder structure was correct. If i use the import option and i select the company folder, i got these options image if i select the "PowershellScripts" folder, i got these options image

Micke-K commented 6 days ago

That is weird. If Bulk Import works, then manual import should work from the same folder. The same import functions are used. Unless it was a temporary glitch in MS Graph.

Does the log have any other issues?

Cheers!

chamtl commented 7 hours ago

Hi, I have the same issue /Claus