-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Used the deploy to Azure button for alert trigger from https://github.com/Azure/Azure-Sentinel/tree/master/Playbooks/Restrict-MDEIPAddress.
Followed the instructions to add permissions -
$MIGuid = ""
$MI = Get-AzureADServicePrincipal -ObjectId $MIGuid
$MDEAppId = "fc780465-2017-40d4-a0c5-307022471b92"
$PermissionName = "Ti.ReadWrite"
$MDEServicePrincipal = Get-AzureADServicePrincipal -Filter "appId eq '$MDEAppId'"
$AppRole =
New-AzureAdServiceAppRoleAssignment -ObjectId $MI.ObjectId -PrincipalId $MI.ObjectId `
-ResourceId $MDEServicePrincipal.ObjectId -Id $AppRole.Id
Getting the following error:
"error": {
"code": 400,
"source": "logic-apis-northcentralus.azure-apim.net",
"clientRequestId": "10029ec8-a4dc-4760-a4c5-b7d208dd07b7",
"message": "The response is not in a JSON format.",
"innerError": "Invalid subscription id or resource group or API connection"
Check the subscription ID and resource group - both are correct. Not sure how to check the API connection but verified I ran the above to give the managed identity permissions.
What am I missing?
Thanks for your help!