-
Notifications
You must be signed in to change notification settings - Fork 44
Description
When testing APIM using the provided example.ps1 run from a Window Server 2022 VM in the same subnet as APIM, I get a "404 Resource not found error".
Invoke-RestMethod : { "statusCode": 404, "message": "Resource not found" }
At line:39 char:1
- Invoke-RestMethod -Uri $apimUrl -Method Post -Headers $apimHeaders -B ...
-
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
AOAI is deployed with private endpoints to eastus in Azure Commercial.
APIM is deployed with private endpoints to eastus in Azure Commercial.
I get the same error whether APIM is deployed in a separate Resource groups or within the same Resource group as AOAI.
The APIM Managed identity has the [Cognitive Services User] and [Cognitive Services OpenAI User] roles on the AOAI Resource group.
The AOAI Vnet and the APIM Vnet are peered.
I added both the AOAI Vnet and the APIM Vnet to the AOAI Private DNS zone.
There is no data in App Insights. No Failed requests, but no Server requests either.
Using Invoke-Restmethod to access AOAI works from the AOAI vnet and from the APIM vnet. There are Windows VMs in each vnet for testing.
I confirmed the APIM backend URL matches the AOAI URL.
My resources when APIM installed in the AOAI Resource group:
There is no NSG on the AOAI subnet.
The APIM NSG looks like this:
I've build and rebuilt this solution several times and in 2 different subscriptions with the same error.