Forum Discussion
carliv
Nov 30, 2022Copper Contributor
Trouble importing analytic rules that has been exported using powershell/api
Hello! Trying import analytic rules to sentinel using repository and azure devops as source. If I manually export trough gui it is working. Pipeline and everything. Issue is if I export it using powe...
GBushey
Dec 01, 2022Iron Contributor
Have you compared the file that gets exported from the GUI to what the API call returns? If I recall, the API will return items like the rules GUID which should not be in the file when you try to upload it.
- carlivDec 01, 2022Copper ContributorThanks for good tip GBushey .
After investigated the json file it's clear that the json file exportet with api call is missing some format/code (sorry for my noobness). its missing this in the top:
"$schema": "https://schema.management.azure.com/schemas/2019-0401/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
adding this with the closing brackets at the bottom, it works. Now I just need to figure out how to include this in the export job or doing som kind of merging afterwards