4

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?

2 Answers 2

8

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

Sign up to request clarification or add additional context in comments.

Comments

0

Also you can find the connection string via Azure portal:

enter image description here

Hope this helps.

1 Comment

Does this work for you? please let me know if you need more help, also if this helpful to you, please don't forget to accept it as an answer so that other community members will be benefited, thanks:)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.