-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Cause: KEY_VAULT_URI environment variable is not set or is empty.
Fix:
az containerapp show -n ca-ltm -g rg-lab-tenant-manager \
--query "properties.template.containers[0].env[?contains(name,'KEY_VAULT')]"If missing, set it:
KV_URI=$(az keyvault show -n <your-kv-name> -g rg-lab-tenant-manager --query properties.vaultUri -o tsv)
az containerapp update -n ca-ltm -g rg-lab-tenant-manager \
--set-env-vars "KEY_VAULT_URI=$KV_URI"Cause: Delegated Power Platform token is missing or expired.
Fix:
- Run Pre-flight checks on the tenant page — check #4 reports token status.
- If missing, click 🔄 Re-authorize Delegated Token and send the URL to the lab tenant Global Admin.
- Re-run provisioning after the token is refreshed.
Without the Power Platform delegated token, Developer environments are created without Dataverse.
Cause: Mail.Send application permission not granted, wrong sender UPN, or sender mailbox not in the operator tenant.
Fix:
- Verify
Mail.Sendis listed as an Application permission (not Delegated):
az ad app permission list --id $CLIENT_ID --query "[?resourceAppId=='00000003-0000-0000-c000-000000000000'].resourceAccess"- Confirm admin consent — each row must show a green ✅ in the portal:
az ad app permission admin-consent --id $CLIENT_ID-
Verify the sender address in
MAIL_SENDER_UPNis a mailbox that exists in the operator tenant (the tenant identified byOPERATOR_TENANT_ID). -
Confirm
OPERATOR_TENANT_IDis the tenant GUID of the operator tenant, not a lab tenant.
Cause: minReplicas is set to 0.
Fix:
az containerapp update -n ca-ltm -g rg-lab-tenant-manager --min-replicas 1Verify:
az containerapp show -n ca-ltm -g rg-lab-tenant-manager \
--query "properties.template.scale"See Onboarding a Lab Tenant → Re-authorizing an Expired Delegated Token.
Cause: OPERATOR_TENANT_ID mismatch, or redirect URI not registered.
Fix:
- Verify
OPERATOR_TENANT_IDmatches the tenant where the app registration was created:
az containerapp show -n ca-ltm -g rg-lab-tenant-manager \
--query "properties.template.containers[0].env[?name=='OPERATOR_TENANT_ID'].value" -o tsv- Verify redirect URIs are registered on the app registration:
az ad app show --id $CLIENT_ID --query web.redirectUris# Stream live logs
az containerapp logs show -n ca-ltm -g rg-lab-tenant-manager --follow
# Last 100 lines
az containerapp logs show -n ca-ltm -g rg-lab-tenant-manager --tail 100az containerapp show -n ca-ltm -g rg-lab-tenant-manager \
--query "properties.template.containers[0].image" -o tsv