Craig
Craig

Reputation: 1225

Azure Connection Strings

I have a .NET application running on Azure, connected to SQL database on Azure using entity framework. Currently my connection strings contain the username and password. I have been asked to remove the username and password information. For our internal applications we have replaced that information with integrated security=True. From what I understand I can't do that with applications running on Azure. What is the easiest way to accomplish this?

Upvotes: 1

Views: 196

Answers (1)

Thiago Custodio
Thiago Custodio

Reputation: 18387

You'll need to create a managed identity, and then add it to your Azure SQL Database + change your code a little bit to use an acquired token from Azure AD in order to execute commands against your SQL database.

There's a step by step in here:

https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-sql

Upvotes: 1

Related Questions