Orchestrator Cannot Access Azure SQL Database

After a fresh installation of Orchestrator as an App Service in Azure, the main page shows "An unexpected error occurred" with Error 500 as the code.

Issue Description:

After a fresh installation of Orchestrator as an App Service in Azure, the main page shows "An unexpected error occurred" with Error 500 as the code.

The Orchestrator Logs are showing the below error:

[Timestamp] [Fatal] UiPath.Orchestrator.Startup.Program Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot open server 'ServerName' requested by the login. Client with IP address 'IP_address' is not allowed to access the server. To enable access, use the Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range. It may take up to five minutes for this change to take effect.

Resolution: Add the mentioned IP address to the Firewall rules of the SQL Server.

  1. Locate the SQL Server in the Azure portal
  2. Navigate to the Networking tab
  3. Fill in the Rule name, Start IPv4 address and End IPv4 address fields and save the changes

Note: The IP addresses of the Orchestrator Azure App Service can change without notice, so it is recommended to check this first when the error occurs (the change is performed in the backend by Microsoft Azure).