An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Thanks Ronn, so glad that got you unblocked!
To answer your follow-up: nope, you actually don't need to touch that SECRET payload at all.
You can't pass a client_id in the JSON because the database engine will literally just ignore it. Instead, Azure SQL handles the routing magically on the server side:
If you attach a User-Assigned Managed Identity (UAMI) to the server, it automatically prioritizes it over the System-Assigned one.
If you happen to have a bunch of UAMIs attached, the system relies strictly on whichever one you designated as the Primary identity at the logical server level.
So, your T-SQL setup stays exactly the same. You just manage the switch on the infrastructure side.
The Configuration
When you are ready to make the switch, just pop open Cloud Shell and run a quick update to ensure your new UAMI is set as the primary.
# Assign the UAMI to the SQL logical server and set it as the primary identity
az sql server update \
--resource-group "YourResourceGroup" \
--name "YourSqlServerName" \
--assign-identity "YourUAMIResourceId" \
--primary-user-assigned-identity-id "YourUAMIResourceId"
Once that is set, your existing DATABASE SCOPED CREDENTIAL will just automatically piggyback on that primary UAMI to fetch the token. No database code changes required!