I am connecting to a database on my Azure server where database is on different server and connection I made by choosing option Active Directory with user Credentials option. It is working in SQL server but I need a connection string to connect with DB. Any suggestions how to do it?
If integrated, then use the below connection string:
Data Source=xxxxxxx.database.windows.net; Initial Catalog=xxxxxxx; Authentication=Active Directory Integrated;
If you're connecting using username and passsword:
Data Source=tcp:xxxxxxx.database.windows.net;Initial Catalog=xxxxxxx; Authentication=Active Directory Password; User ID=xxxxxxx; Password=xxxxxxx;
Reference: https://github.com/Huachao/azure-content/blob/master/articles/sql-database/sql-database-aad-authentication.md#7-connect-to-your-database-by-using-azure-active-directory-identities
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With