John Liu Blog

Every drop counts

Azure SQL DB call external API

With the introducing of sp_invoke_external_rest_endpoint in Azure SQL DB, it’s possible to directly calling the Azure OpenAI service within the database. Azure OpenAI is in the safe-listed Azure services. For other API service (like common OpenAI) that’s not in the safe-list, you will need to create a wrapper API in the Azure API Management Instance. To invoke external rest endpoint in Azure SQL DB, a few setup steps are required:

Azure OpenAI Troubleshooting

Access denied due to Virtual Network/Firewall rules When making calls to your OpenAI deployed model, you may receive following error: “Access denied due to Virtual Network/Firewall rules.” As the error message suggested, check the “Firewalls and virtual networks” setting for you Azure OpenAI in Azure Portal under “Resource Management” –> “Networking”. If the firewalls are configured for “Selected Networks and Private Endpoints”, make sure the IP address of you current computer is allowed to access the network.