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

Unable to deploy to BAMI Tenant

Closed this issue · 1 comments

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=<your_subscription_id>
export AZURE_TENANT_ID=<your_tenant_id>

On Windows
set AZURE_SUBSCRIPTION_ID=<your_subscription_id>
set AZURE_TENANT_ID=<your_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

Fixed ensure you use

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