Not able to connect to database

Hi I am trying to connect to database using connect datatable activity but i am not able to connect using UiPath.
Below are the details :

Server name: 3tovfd2wtpje3cyj4n7xlioap4-gnfauwqg6tpu3g4eplxksw5pky.datawarehouse.fabric.microsoft.com

Authentication: Microsoft Entra MFA
User: xxxx@xxxx.com
Encryption: Mandatory

Please help me with the connection string

@harshit.gupta

I don’t have a database to try but try this one. Make sure you replace the <YourDatabaseName> with your actual database name and other placeholders accordingly.

Server=tcp:<YourServerName>,1433;
Initial Catalog=<YourDatabaseName>;
Authentication=ActiveDirectoryInteractive;
User ID=<YourUserName>;
Encrypt=True;
TrustServerCertificate=True;

@harshit.gupta

Try to look below tutorial and also follow the below threads,

@harshit.gupta you cannot directly use Microsoft Entra ID MFA authentication in a UiPath SQL connection string/activity. This is because Entra with MFA usually requires interactive login or token based authentication. You should create SQL authentication instead by creating a specific user for your RPA use that has access limited only to the tables it needed.

It looks like the issue is related to the authentication method rather than the connection details. Since you’re using Microsoft Entra MFA, the standard UiPath database activities may not support it directly. I recommend checking whether your UiPath version and the database provider support Microsoft Entra MFA. If they don’t, you may need to use an alternative authentication method, such as a service principal or an access token. Hope this helps!

Hi @harshit.gupta

Check if the default SQL ports are open in the firewall between the server and client:

  • TCP 1433
  • UDP 1434

Regards
Soren