IntuneManagement
IntuneManagement copied to clipboard
Defender baseline policy not importing.
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,
Hello,
Thank you! I'll try to have a look at this.
Cheers!
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!
Thanks Micke
Hi Have you been able to fix this? I get the same error when trying to import Windows11-v24H2 securitybaselines. I attached my json
cfg_w11-SecurityBaselineWindows_v24H2.json
i have to mention that the policy has been exported from one tenant and then try'd to import it into another.
Any help appreciated!
Hello,
So sorry. I worked on this way back but couldn't figure it out. I spent some time on it the last couple of days to dig deeper into it and I finally found what caused it. It turns out that the guid IDs in the Setting Catalog settings are case sensitive and there is ONE setting in 24H2, Machine Identity Isolation, that has uppercase in settingValueTemplateId and settingInstanceTemplateId. The API returns it with lowercase during export. It took me some time to figure that one out.
I could import the json you attached with the latest updates.
You can download the updates in the development branch and let me know how it goes.
Cheers!
Hi Micke Yes i just testet it and it works! Thanks so much for fixing it and putting time into this. Regards!