Azure Function App not able to access Azure SQL server- saying Client IP need to be added in SQL Server

Viewed 2514

Getting below exception when my Azure Function App tries to connect with Azure SQL Server.

Cannot open server 'my-sql-sever' requested by the login. Client with IP address '52.165.228.212' is not allowed to access the server.  To enable access, use the Windows 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.

Getting below exception when my Azure Function App tries to connect with Azure SQL Server.

Cannot open server 'my-sql-sever' requested by the login. Client with IP address '52.165.228.212' is not allowed to access the server. To enable access, use the Windows 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. I was in impression that by default all Azure IPs of SQL database are whitelisted to Azure Fuction.

Please suggest.

Thanks, Siraj

2 Answers

We need to white list the our function app hosted IP address. This can be fund the configuration settings. This is typically a range.

Related