A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
Hello Heeyaichen Konsam,
Thanks for raising it in the Q&A forum!
This error occurs when Azure Developer CLI (azd) cannot detect or access your Azure subscriptions during provisioning. Even though you've authenticated with azd auth login, the CLI may not have retrieved your subscription list or set a default subscription.
Resolution Steps
Set Default Subscription Explicitly: After authenticating, manually set your default Azure subscription:
bash
# List available subscriptions
This ensures both az CLI and azd use the correct subscription.
Use Tenant-Specific Login: If your account has access to multiple tenants, specify the tenant ID during login:
bash
# Find your tenant ID in Azure Portal > Subscriptions > Directory
Set Environment Variable for Subscription: Before running azdeploy.sh, explicitly specify the subscription ID as an environment variable:
bash
export AZURE_SUBSCRIPTION_ID=<YOUR_SUBSCRIPTION_ID>
bash azdeploy.sh
Or configure it directly in azd:
bash
azd config set defaults.subscription <YOUR_SUBSCRIPTION_ID>
Verify Authentication Status: Ensure both Azure CLI and Azure Developer CLI are properly authenticated:
bash
# Check Azure CLI authentication
If either shows unauthenticated, log in again:
bash
az login
azd auth login
Use Interactive Mode (if applicable): If running in an environment that supports interactive prompts, try running azd without the --no-prompt flag to manually select the subscription.
Clear Cache and Re-authenticate: If the issue persists, clear authentication cache and retry:
bash
azd auth logout
az logout
rm -rf ~/.azure
az login
azd auth login --use-device-code
az account set --subscription <YOUR_SUBSCRIPTION_ID>
bash azdeploy.sh
Additional Considerations
- Ensure your subscription is enabled and you have Contributor or Owner permissions on the subscription
- If using Azure Cloud Shell, verify you're in the correct directory context and the subscription is visible in the Azure Portal
- Some lab environments may require specific subscription configurations—check the lab prerequisites at https://github.com/MicrosoftLearning/mslearn-ai-language/blob/main/Instructions/Labs/11-voice-live-agent-web.md
If this helps, kindly accept the answer.
Best Regards,
Jerald Felix