Hello so I’m trying to deploy an ARM template to role assign a managed identity resource to one of our service buses.
The Servicebus resource and the Managed identity resource are located in two different subscriptions and resource groups.
The error I receive doesn’t tell me much, or rather I don’t understand what its trying to tell me. I’ve looked into the template structure and implementation of properties and I’ve gone through the template both getting the values via Azure Arm Functions dynamically and using hardcoded values but nothing seem to work.
The error I get is:
##[error]Failed to check the resource group status. Error: {“statusCode”:400}.
The role assignment in my arm template looks like this currenctly:
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2018-09-01-preview",
"name": "[guid(concat('/subscriptions/', parameters('sbSubscriptionGUID')), concat('/subscriptions/', parameters('sbSubscriptionGUID'), '/resourceGroups/', parameters('sbResourceGroup')), parameters('serviceBusName'), 'InstalledBaseInbound-Sb-Sender')]",
"scope": "[resourceId(parameters('sbSubscriptionGUID'), parameters('sbResourceGroup'), 'Microsoft.ServiceBus/namespaces', parameters('serviceBusName'))]",
"properties": {
"roleDefinitionId": "[concat('/subscriptions/', parameters('sbSubscriptionGUID'), '/providers/Microsoft.Authorization/roleDefinitions/', '69a216fc-b8fb-44d8-bc22-1f3c2cd27a39')]",
"principalId": "[reference(concat('/subscriptions/', parameters('uaiSubscriptionGUID'), '/resourcegroups/', parameters('installedbaseinboundRg'), '/providers/Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('uaiName')), '2023-01-31').principalId]"
}
}
Anyone else encountered anything similar?