DEV Community

Cover image for Use Azure SQL Server with MSI
Antoine
Antoine

Posted on

2 2

Use Azure SQL Server with MSI

Photo by Kyle Glenn on Unsplash

I have just read this interesting blog about different scenarios supported by SQL Data client.

I am interested in setting an Azure SQL server with:

  • restriction for Managed Service Identity access
  • allowing access for developers on only one server easily (without password)
  • keeping one limited access

This tutorial covers everything i think.

I can:

  • assign a MSI to one Azure SQL Server
  • use Visual Studio Code / Visual Studio supported method to authenticate for developer
  • create a group, to allow a different account to access SQL Server

The Default authentication section worth the read.

And it seems not to limit to SQL as the example shows:

// When deployed to an azure host, the default azure credential will authenticate the specified user assigned managed identity.

string userAssignedClientId = "<your managed identity client Id>";
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions { ManagedIdentityClientId = userAssignedClientId });

var blobClient = new BlobClient(new Uri("https://myaccount.blob.core.windows.net/mycontainer/myblob"), credential);
Enter fullscreen mode Exit fullscreen mode

Hope this helps !

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay