0

I'm trying to connect to Azure SQL DB using AD Authentication (Managed Identity) in Data Factory by saving the connection string in Azure Key Vault. I've setup the Managed Identity access in Azure SQL DB by providing the access to ADF (ADF name). I've stored the connection string in Key Vault in following formats but I was not successful.

Tried following formats of connection strings:

Server=tcp:xxxxxxxxxx.database.windows.net;Initial Catalog=xxxxxxx;Authentication = 'Active Directory Interactive';

Server=tcp:xxxxxxxxxxxx.database.windows.net;Initial Catalog=xxxxxxxxxxx;User ID=DatafactoryName;Authentication = 'Active Directory Interactive';  -- Actual DatafactoryName

Server=tcp:xxxxxxxxxxxxxx.windows.net;Initial Catalog=xxxxxxxxx;User ID=MSI_ID;Authentication = 'Active Directory Interactive';   -- Actual MSI ID for the DataFactory

Server=tcp:xxxxxxxxxxxxxx.windows.net;Initial Catalog=xxxxxxxxx;User ID=a;Authentication = 'Active Directory Interactive';   -- Tried arbitrary value

I'm getting the following error

enter image description here

3
  • Hi, is the error solved now? Commented May 13, 2021 at 1:07
  • Yes, it's resolved now. Commented May 22, 2021 at 1:07
  • can you please accept it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in.)? This can be beneficial to other community members. Thank you. Commented May 24, 2021 at 1:15

2 Answers 2

3

The connection string should be:

Data Source=tcp:<servername>.database.windows.net,1433;Initial Catalog=<databasename>;Connection Timeout=30

The connection should like this: enter image description here

Ref: Managed identities for Azure resources authentication and Reference secret stored in key vault

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

3 Comments

This worked, thank you! I've followed only the connection string provided by you and then referred the connection string from keyvault rather than providing the connection string manually in the Linked Service
@ravitejaPuppala you're welcome! If my answer is helpful for you, please accept it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in.). This can be beneficial to other community members. Thank you.
Hello @ravitejaPuppala, hope you're doing well, do you have any other concerns?
0

You can try

Integrated Security=False;Encrypt=True;Connection Timeout=30;Data Source=xxxxxxxxxx.database.windows.net;Initial Catalog=xxxxxxx

Comments

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.