Azure-Samples / Azure-Samples/azure-sql-db-chatbot

OpenAI Returns 403 On API Attempt

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TSQL
Stars
67
Forks
28
PR merge metrics
No merged PRs in 30d

Description

I have setup "Allow Azure Services and resources to access this server" to ON for both my Azure AI OpenAI and Azure SQL. I can confirm this from the MASTER.sys.firewall_rules database view that I see entry for 'AllowAllWindowsAzureIps' with a value of '0.0.0.0'. On our OpenAI deployment I have it set to ON as well. However, I see no other indication in the list of the allowed IPs. We are using a Virtual Network on the OpenAI deployment if that makes a difference.

This occurred on file 05-get-search-vector.sql.

Error message:
```
{
"response":{
"status":{
"http":{
"code":403,
"description":""
}
},
"headers":{
"Date":"Wed, 23 Apr 2025 12:02:56 GMT",
"Content-Length":"90",
"Content-Type":"application\/json",
"apim-request-id":"c85f3b15-cf66-4482-a190-82ac6e287aad",
"strict-transport-security":"max-age=31536000; includeSubDomains; preload",
"x-content-type-options":"nosniff",
"policy-id":"ThrowExceptionDueToTrafficDenied"
}
},
"result":{
"error":{
"code":"403",
"message": "Access denied due to Virtual Network/Firewall rules."
}
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.