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.14k stars 201 forks source link

Defender baseline policy not importing. #241

Open l4m3us3r opened 4 months ago

l4m3us3r commented 4 months ago

I have exported one of the new defender baseline policies using IntuneManagement, but the import is failing:

Import Settings Catalog object [MWP Template] Prod_Win_Endpoint Security - Security Baseline_Defender_Device WARNING: Could not find migration table Failed to invoke MS Graph with URL https://graph.microsoft.com/beta/deviceManagement/configurationPolicies (Request ID: a015b564-e738-4f4c-a64e-0074edc27015). Status code: BadRequest. Response message: . Response message: Info Invalid Reference id found in Policy created from Template 49b8320f-e179-472e-8e2c-2fde00289ca2_1 PolicyId

TemplateId 49b8320f-e179-472e-8e2c-2fde00289ca2_1 InvalidReferenceId f00bbe6f-591a-470d-b640-c707a10f32df - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 81e338e0-f958-4b73-8a65-101383b90e37 - Url: https://fef.msuc03.manage.microsoft.com/DeviceConfigV2/DCV2GraphService/de147310-ffff-8461-0512-062013234579/deviceManagement/configurationPolicies?api-version=5024-04-01 Exception: The remote server returned an error: (400) Bad Request. Trigger function Invoke-EMSelectedItemsChanged Trigger Invoke-EMSelectedItemsChanged in Compare Trigger Invoke-EMSelectedItemsChanged in Documentation Trigger Invoke-EMSelectedItemsChanged in EndpointManager Loading Settings Catalog objects

I have attached the json [MWP Template] Prod_Win_Endpoint Security - Security Baseline_Defender_Device.json please assist,

Micke-K commented 4 months ago

Hello,

Thank you! I'll try to have a look at this.

Cheers!

Micke-K commented 1 month ago

Hello,

Sorry for a very late answer. I completely forgot about this after the holiday.

I had a look at this, and it looks like Microsoft are doing some weird things here. The id for each setting is unique in each environment which makes it "impossible" to migrate between environments. I have to see if I can come up with something to fix this, but it will take a while. I need a solution for like for the ADMX files which has the same problem.

Cheers!

l4m3us3r commented 1 month ago

Thanks Micke