Issue
There was a need to connect to sharepoint in a Logic app standard workflow, but In App(Built in) connector is not available so had to go with Azure Connector.
And got an error at runtime, as can be seen below
Why it happened
There are a few possible reasons for receiving an “UnresolvableHostName” error when using the Azure SharePoint connector in a VNet-integrated Logic App Standard instance:
DNS resolution:Â The Logic App Standard instance is not able to resolve the hostname of the SharePoint site. This could be due to a number of factors, such as a misconfiguration of the VNET DNS settings, or a firewall blocking traffic to the SharePoint site.
Network connectivity:Â There is a network connectivity issue between the Logic App Standard instance and the SharePoint site. This could be due to a firewall blocking traffic, or a network outage.
SharePoint site configuration:Â The SharePoint site is not configured correctly. For example, the site may not be accessible to users outside of the organization, or the site may be missing the necessary permissions.
What to do
Below are few things tried:
1. Check the Logic App Standard instance logs. The logs may provide more information about the cause of the error. – Not helpful, nothing substantial
2.Make sure that the SharePoint site is configured correctly. The site should be accessible to users outside of the organization, and the site should have the necessary permissions. – Nothing wrong here
3.Try using a different SharePoint site. This will help you to determine if the problem is related to the specific SharePoint site that you are trying to connect to. – Got same error
4.Try using the SharePoint connector in a non-VNet-integrated Logic App Standard instance. This will help you to determine if the problem is related to VNet integration. – It worked, workflow in Logic app standard which is not integrated with vnet Â
So now, left with two things DNS and Firewall
5. Got the ips/servicetags of sharepoint connector whitelisted in the Firewall – Same errorÂ
6.Make sure that the Logic App Standard instance has the correct DNS settings. The DNS settings should be configured to use the DNS servers of your VNET.
Added below configuration settings (app settings)
WEBSITE_VNET_ROUTE_ALL to 1 – It routes all outbound traffic from LogicApp resource via integration VNET and Subnet.
WEBSITE_DNS_SERVER to 168.63.129.16 (or) Custom DNS server IP Address – It is used for resolving all host names to Ips. You can set either default Azure DNS IP or Custom DNS IP address.
Still same Error
Got into call with the network team, and after troubleshooting got to know that DNS resolution was not happening.
And the reason was, we are using Custom DNS server, and entry had to be made for the sharepoint connectors in it.
After doing that, all worked absolutely fine.