Skip to content

Error 400 - Restrict-MDEIPAddress #4052

@tora1104

Description

@tora1104

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 = $MDEServicePrincipal.AppRoles | Where-Object {$.Value -eq $PermissionName -and $.AllowedMemberTypes -contains "Application"}
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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions