microsoft / aitour-llmops-with-gen-ai-tools

AI Tour 2025 BRK451 Code-First LLMOps from Prototype to Production with GenAI Tools
MIT License
25 stars 5 forks source link

Unable to deploy to BAMI Tenant #10

Closed leestott closed 1 week ago

leestott commented 1 week ago

Deployment issue with BAMI based on https://github.com/microsoft/aitour-llmops-with-gen-ai-tools/blob/main/session-delivery-resources/deployment/README.md

@cedricvidal @revodavid

Issues

User cannot created using azd up services to a BAMI Tenant

Validation of steps

az login --use-device-code --tenant ID

Login correct

azd auth login --tenant id

Login error Error: unknown flag: --tenant

azd auth login az account show

Show correct tenant and subscription ID

azd config set tenant ID

Set correct tenant

azd up

Only shows subscription in primary @microsoft.com tenant

Solution - FIX

On Codespaces/Linux

export AZURE_SUBSCRIPTION_ID= export AZURE_TENANT_ID=

On Windows set AZURE_SUBSCRIPTION_ID= set AZURE_TENANT_ID=

Then run

azd auth login

Then azd up

Failure ERROR: listing locations: failed retrieving Azure location for account 'SubID': failed to resolve user 'UserID' access to subscription with ID 'SubID'. If you recently gained access to this subscription, run azd auth login again to reload subscriptions. Otherwise, visit this subscription in Azure Portal using the browser, then run azd auth login

However running az Login shows correct tenant and subscription

and running az account show --query "[name, id, tenantId]"

Shows correct tenant and subscription

leestott commented 1 week ago

Fixed ensure you use

azd auth login --tenant-id 'tenantID' --use-device-code as the command