0
votes

I am trying to connect to azure sql server using Windows Authentication from azure Web Job. I have tried using the below connection string. When I run the code in an IDE, it is taking the user who is currently running the code. But it's not the same from Web Job.

Server=dev;Database=DataMart; Integrated Security= True

Could anyone help me find a work around on this?

1

1 Answers

0
votes

Azure SQL database/Azure SQL Server doesn't support Windows authentication for now. Please reference this document Authentication:

SQL Database supports two types of authentication:

SQL Authentication:

This authentication method uses a username and password. When you created the SQL Database server for your database, you specified a "server admin" login with a username and password. Using these credentials, you can authenticate to any database on that server as the database owner, or "dbo."

Azure Active Directory Authentication:

This authentication method uses identities managed by Azure Active Directory and is supported for managed and integrated domains. If you want to use Azure Active Directory Authentication, you must create another server admin called the "Azure AD admin," which is allowed to administer Azure AD users and groups. This admin can also perform all operations that a regular server admin can. See Connecting to SQL Database By Using Azure Active Directory Authentication for a walkthrough of how to create an Azure AD admin to enable Azure Active Directory Authentication.

We can not connect to azure sql server using Windows Authentication from azure Web Job.

Hope this helps.