How do I fix a persistent 401 unauthorized error when trying to connect an OpenAI custom action to a secured Azure SQL database
Download run
Fan-out diagram
The searches the AI actually ran for this prompt.
SEED QUERY
How do I fix a persistent 401 unauthorized error when trying to connect an OpenAI custom action to a secured Azure SQL database
3 real searches · 1 real-search pass
OpenAI GPT Actions authentication API key OAuth OpenAPI documentation Azure SQL Microsoft Entra authentication troubleshooting 401 official docsGoogle ↗
OBSERVEDInstruction
OpenAI GPT Actions authentication API key OAuth official documentation Azure SQL 401 unauthorizedGoogle ↗
OBSERVEDInstruction
Microsoft Azure SQL Database authenticate application service principal managed identity Microsoft Entra official documentationGoogle ↗
OBSERVEDInstruction
Badge and edge weight = share of passes that produced the query. Hover a query for its intent and routing format.
Query classes
Google's semantic query class for every sub-query: what kind of answer each search is after, simulated vs real.
ChatGPT real searches (3)
Classes come from the query-classifier (a local Laya model). 3 of 3 calls are low-confidence (under 50%) — hover a query in the table to see its confidence.
Searches and sources
ChatGPT3 real searches · gpt-6
OpenAI GPT Actions authentication API key OAuth OpenAPI documentation Azure SQL Microsoft Entra authentication troubleshooting 401 official docs Google ↗
OpenAI GPT Actions authentication API key OAuth official documentation Azure SQL 401 unauthorized Google ↗
Microsoft Azure SQL Database authenticate application service principal managed identity Microsoft Entra official documentation Google ↗
- Configuring actions in GPTs · help.openai.com
- Configuring actions in GPTs · help.openai.com
- Microsoft Entra Service Principals with Azure SQL - Azure SQL Database & Azure SQL Managed Instance · learn.microsoft.com
- Microsoft Entra Authentication - Azure SQL Database & Azure SQL Managed Instance · learn.microsoft.com
Queries
3 queries · click a column to sort
| Query / type | Search | Intent | Query class | Routing format | Cluster | Freq ↓ | Weight |
|---|---|---|---|---|---|---|---|
OpenAI GPT Actions authentication API key OAuth OpenAPI documentation Azure SQL Microsoft Entra authentication troubleshooting 401 official docs OBSERVED | Google ↗ AI Mode ↗ | — | Instruction | — | — | 1x of 1 | |
OpenAI GPT Actions authentication API key OAuth official documentation Azure SQL 401 unauthorized OBSERVED | Google ↗ AI Mode ↗ | — | Instruction | — | — | 1x of 1 | |
Microsoft Azure SQL Database authenticate application service principal managed identity Microsoft Entra official documentation OBSERVED | Google ↗ AI Mode ↗ | — | Instruction | — | — | 1x of 1 |