Logic App not allowed to access the SQL server | Cannot open server 'xx' requested by the login. Client with IP address 'xx' is not allowed to access the server

{tocify} $title={Table of Contents}

Error/Issue:


While creating SQL Server api connection in Logic app, received below error

Logic app is not allowed to access Server





 Microsoft SQL: Cannot open server 'demosqlservertf' requested by the login. Client with IP address '52.172.211.12' 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


Why it happened

 

The database which is to be accessed, resides on the SQL server and by default Public access is set to Selected Networks.

Public access option on sql server


No network was selected and no firewall rule was added to accept access request.


What to do

As the error says, in order to access the database,  create a firewall rule for this IP address or address range i.e. the ip address of the underlying machine/machines which hosts the Logic App has to be added to the Allowlist under Firewall Rules of the SQL Server.

The ip address to be added is already mentioned in Error .

Click on Add a Firewall rule

Add logic app ip address to SQL Firewall





What if I want access to this database from Logic App in ISE, which is in a virtual network?

For that , click on Add a virtual network rule and add the details

add a virtual network rule in SQL Server networking



If you have questions or suggestions, feel free to do in comments section below !!!


Do share if you find this helpful .......
 
                          Knowledge Sharing is Caring !!!!!!








Post a Comment

If you have any suggestions or questions or want to share something then please drop a comment

Previous Post Next Post