Azure Synapse Analytics :- Managed Identity Credential Set Default

Prashant Rewatkar 96 Reputation points
2022-06-02T06:57:18.153+00:00

Hello Team,

How could we set default manage identity for Azure synapse resources without mentioning param while creating a synapse resource client?

Like below code -

LinkedServiceClient client = new LinkedServiceClient(endpoint: new Uri("url"), credential: new DefaultAzureCredential());

For
credential: new DefaultAzureCredential()

The mentioned code works fine for local env but doesn't work after deployed on the server. It is throwing an exception "ManagedIdentityCredential authentication failed: No MSI found for specified ClientId/ResourceId. Status: 400 (Bad Request)"

If we specify a Managed Identity ClientId for credentials, then it works smoothly on local and server env too.

Code :-
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions { ManagedIdentityClientId = "abcs"});
var client = new LinkedServiceClient(endpoint: new Uri("url"), credential: credential);

We don't want to set any ManagedIdentityClientId for DefaultAzureCredentialOptions. This could be set by default on the server.
The default value should be picked up from the azure portal.

How could we manage this ? Is there any way to do this ?

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.
4,357 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,514 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,429 questions
{count} votes