John Goodwin
John Goodwin

Reputation: 361

Azure SQL Authentication connection string in Azure App Service?

Microsoft allows use of the Authentication command in Azure SQL to connect to the database using an Azure AD account.

https://azure.microsoft.com/en-us/documentation/articles/sql-database-aad-authentication/

Under heading 7.1. Connecting using integrated (Windows) authentication

How can I use this on an Azure App Service?

Note: I am specifically trying NOT to include the password as the next heading shows. I specifically want integrated.

Upvotes: 2

Views: 1504

Answers (2)

Erik Oppedijk
Erik Oppedijk

Reputation: 3551

Azure App Service machines are not part of your domain, so this isn't going to work. This was designed to let domain joined clients connect to SQL.

SQL Username/password is the only option left.

Update: see Chris Post about the new token based features

Upvotes: 0

Chris Gillum
Chris Gillum

Reputation: 15042

If my understanding of the documentation is correct, you can achieve this yourself using Token Based authentication. It shouldn't require anything special from Azure App Service. See here for details and sample code:

https://blogs.msdn.microsoft.com/sqlsecurity/2016/02/09/token-based-authentication-support-for-azure-sql-db-using-azure-ad-auth/

The new token-based authentication method allows middle-tier services to obtain a token from Azure AD and use it to connect to Azure SQL Database.

Upvotes: 1

Related Questions