Azure AD with Azure SQL Database (Best Security approach in Connection String)

Rahul 241 Reputation points


In Azure SQL Database (Single Instance) what is the best approach for connecting to a Database ?

I want to maintain a connection string with Azure SQL DB without exposing the credentials. i.e.

Not using SQL authentication, wherein we provide username and password for logins and are only valid in the context of a specific database within the server

Need to use Azure AD authentication, use identities managed by Azure AD.

However I'm able to implement this ( where we connect with Azure AD credentials.

But I need to maintain a connection string which is always active if I give Azure AD credentials in connection string it will get disconnected as Azure Session token might expire at some point of time.

Any Suggestion here how to achieve this maintain Azure SQL connection without exposing Azure AD credentials ?


Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,146 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Farcasescu, Marcela 1 Reputation point

    This website is showing the 3 main options you could use:

    0 comments No comments

  2. @huatuostudio 1 Reputation point

    I'm also interested in this situation.

    0 comments No comments