Hi Sida Jiang
Welcome to the Microsoft Q&A Platform!
The error "Failed to fetch locations" typically occurs when deploying a web app or configuring resources in Azure due to a misconfiguration, network restriction, or issue with your Azure environment setup.
- Ensure Azure OpenAI is supported in your selected region.
- Confirm your Azure subscription has access to the Azure OpenAI service.
- Check with your Azure admin if necessary.
- Allow outbound traffic to these domains.
*.azure.com
*.microsoft.com
- Test connectivity with.
az network watcher connectivity-check --source-resource <resource-id> --destination-address management.azure.com
- Update Azure CLI
az upgrade
- Go to Subscription > Resource Providers.
- Register
Microsoft.Web
,Microsoft.CognitiveServices
, andMicrosoft.OpenAI
. - Create and deploy resources via CLI.
az group create --name myResourceGroup --location eastus
az deployment group create \
--resource-group myResourceGroup \
--template-file webapp-template.json \
--parameters location=eastus
- Check Activity Log in the Azure portal for deployment error details.
- Confirm your role as Contributor or Owner in the subscription.
ref: Azure RBAC Documentation
Azure Activity Log
If the answer is helpful, please click "Accept Answer" and kindly upvote it.