Problem deploying AI Foundry Hub via Bicep to Managed Application Resource Group

Don van Meel | Twyzer 40 Reputation points
2025-05-26T06:26:46.95+00:00

We have a Managed application for the Azure Marketplace. We create a serviceconnection to have acces to the managed application resource group with owner rights added via the principal idUser's image

on the management access settings of the plan . We can deploy all kind of resources like app services log analytics storage accounts etc. But we cant create an Azure AI Foundry Hub. We get the following error:

{
    "status": "Failed",
    "error": {
        "code": "ServiceError",
        "target": "POST http://authorization.vienna-francecentral.svc/authorization/v1.0/checkaccess/subscriptions/12345/resourceGroups/mrg",
        "message": "Received 401 from a service request",
        "details": [
            {
                "code": "Unauthorized",
                "message": "{\n  \"error\": {\n    \"code\": \"UserError\",\n    \"severity\": null,\n    \"message\": \"Tenant move is not supported for workspace. We are unable to serve the request with old tenant id. Please create new workspace\",\n    \"messageFormat\": null,\n    \"messageParameters\": null,\n    \"referenceCode\": null,\n    \"detailsUri\": null,\n    \"target\": null,\n    \"details\": [],\n    \"innerError\": {\n      \"code\": \"AuthorizationError\",\n      \"innerError\": {\n        \"code\": \"ActionUnsupportedByTenantMoveError\",\n        \"innerError\": null\n      }\n    },\n    \"debugInfo\": null,\n    \"additionalInfo\": null\n  },\n  \"correlation\": {\n    \"operation\": \"4fea6d06ac7b9272a547d33f52b2fe04\",\n    \"request\": \"ea3bc897a26f2062\"\n  },\n  \"environment\": \"francecentral\",\n  \"location\": \"francecentral\",\n  \"time\": \"2025-05-25T16:45:49.8995266+00:00\",\n  \"componentName\": \"authorization\",\n  \"statusCode\": 401\n}",
                "details": []
            }
        ]
    }
}

The bicep looks like this:

resource aiHub 'Microsoft.MachineLearningServices/workspaces@2025-01-01-preview' = {
  name: name
  location: location
  tags: tags
  kind: 'hub'
  identity: {
    type: 'SystemAssigned'
  }
  properties: {
    applicationInsights: applicationInsightsId
    keyVault: keyVaultId
    storageAccount: storageAccountId
  }
}

Ive tried allkind of settings but still getting this error.

Azure Machine Learning

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.