Invalid user assigned managed identycredential

Atul kumar 20 Reputation points
2025-09-07T12:31:17.8866667+00:00

Hi All,

I am creating linked service connecting to dataverse using user managed identity via credentials and it is working fine while doing test connections but I got issue while publishing Linked Service & Credential.

Error code: OK

Inner error code: InvalidUserAssignedMiCredential

Message: The referenced user assigned managed identity in the credential is not associated with the factory. Credential name: XXXXXX, Managed identity resource id: @{parameters('XXXXXXX')}

I just created Linked service using credentials as User assigned managed identity and provided UAMI name using parameters so that it can be working in all the environments.

I can test in Azure Portal and Linked Service is connecting successfully but while publishing in main branch it is failing publish and giving above error.

I am using Azure synapse for this. any help will be helpful !!

Script for Credential:

{

Copy

"name": "Name",

"properties": {

	"type": "ManagedIdentity",

	"typeProperties": {

		"resourceId": "@{parameters('parameterName')}"

	}

},

"parameters": {

	"parameterName": {

	"type": "string",

	"defaultValue": "/subscriptions/../resourcegroups/../providers/Microsoft.ManagedIdentity/userAssignedIdentities/.."
}
}
} 
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
{count} votes

1 answer

Sort by: Most helpful
  1. Atul kumar 20 Reputation points
    2025-09-30T17:32:58.42+00:00

    Hi Team,

    I would like to inform that my issue is resolved.

    Please find summary:

    Issue - Linked Service (Dataverse) using Credential with User Assigned Managed identity is not getting parametrized in Azure Synapse Analytics.

    Summary - When we create Linked service in Azure Synapse workspace and publish main branch then Workspace_publish branch gets 2 files a)TemplateForPrameter.json b) TemplateForWorkspace.json and using Override Parameters its values gets changed environment wise environment.

    But for me in Azure Synapse Analytics, I couldn't see these attributes in Parameters (like serviceUri in Linked Service & resourceId in Credential).

    I would like to thank for your suggestion to create custom template file in root folder named templates-parameters-definition.json.

    But when I followed the suggested code as below:

    { "linkedService":

    { "Dataverse":

    { "properties":

    { "typeProperties":

    { "serviceUri":

    { "type": "String", "defaultValue": "" }

    }

    }

    }

    },

    "credential": { "abcCredential":

    { "properties":

    { "typeProperties":

    { "resourceId":

    { "type": "String", "defaultValue": "" } }

    }

    }

    }

    }

    This has removed my existing parameters.

    Then, I have used below code:

    "Microsoft.Synapse/workspaces/linkedServices": { "": { "properties": { "typeProperties": { "accountName": "=", "username": "=", "connectionString": "|:-connectionString:secureString", "secretAccessKey": "|" } } }, "AzureDataLakeStore": { "properties": { "typeProperties": { "dataLakeStoreUri": "=" } } }, "AzureKeyVault": { "properties": { "typeProperties": { "baseUrl": "|:baseUrl:secureString" }, "parameters": { "KeyVaultURL": { "type": "=", "defaultValue": "|:defaultValue:secureString" } } } } }, "Microsoft.Synapse/workspaces/datasets": { "": { "properties": { "typeProperties": { "folderPath": "=", "fileName": "=" } } } }, "Microsoft.Synapse/workspaces/credentials" : { "properties": { "typeProperties": { "resourceId": "=" } } } }

    Reference: https://dori-uw-1.kuma-moon.com/en-us/azure/synapse-analytics/cicd/continuous-integration-delivery

    And, I am able to get parameters for serviceUri & resourceId.

    I am really thankful for your help & support through out the journey and adding my knowledge in custom arm template implementation in Azure Synapse Analytics.

    Thanks

    Atul Kumar

    1 person found this answer helpful.
    0 comments No comments

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.