Azure Synapse :- ManagedIdentityCredential authentication failed

Prashant Rewatkar 101 Reputation points
2022-05-27T19:09:45.95+00:00

Hello team,

Issue :- ManagedIdentityCredential authentication failed: No MSI found for specified ClientId/ResourceId. Status: 400 (Bad Request)

We are facing one issue with azure synapse activity.
We are trying to creates LinkedServices and datasets using azure synapse analytics API(Using Azure.Analytics.Synapse.Artifacts) from Dot Net environment(Dot net core).

We are able to create those resources from local On the server we are facing above mentioned issue.
We have tried lots but we haven't had success with it.

Code for creating a credential

var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions { ManagedIdentityClientId = "<your client id>" });

What are we missing?
Thank you!

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} vote

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,631 Reputation points Microsoft Employee Moderator
    2022-06-07T11:48:29.767+00:00

    Hi @PrashantRewatkar-4915,

    Thanks for posting query in Microsoft Q&A Platform.

    From error message it seems you are supplying correct user assigned managed identity. Hence resulted in bad request.

    I have gone through documentation SDK for concerned classes and properties. It seems ManagedIdentityClientId property specifies the client id of a user assigned Managed Identity. Click here to know more about same.

    Kindly make sure you pass user assigned managed identity to that property. Managed Identities are two types System assigned and User assigned. Click here to know more about these.

    Hope using user assigned managed identity will solve issue here.

    ----------

    Please consider hitting Accept Answer button. Accepted answers help community as well.


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.