Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
6.34k stars 4.24k forks source link

Failed to Resolve User Access to Subscription with ID **** #1095

Open XGUERETTE opened 10 months ago

XGUERETTE commented 10 months ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> Hi, I am trying to use GitHub CodeSpace to provision resources and deploy the application and for some reason even after I have authenticated, I received the error here below when I attempt to run the `azd up` Command . Initially, when I ran azd up, I could not see the target subscription and the tenant in which I wanted to deploy and provision the resources. For some reason, it saw other tenants where my UserId is invited, but not my main tenant. Therefore, I have added the AZURE_SUBSCRIPTION_ID and AZURE_TENANT_ID and AZURE_AUTH_TENANT_ID as environment variables with the command `azd env set`.
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

azd up

Any log messages given by the failure

ERROR: deployment failed: failing invoking action 'provision', error deploying infrastructure: resolving bicep parameters file: fetching current principal id: getting tenant id for subscription XXXXXX-XXXXX-XXXX-XXXX-XXXXXXX. Error: failed to resolve user access to subscription with ID 'XXXXXX-XXXXX-XXXX-XXXX-XXXXXXX'. 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

Expected/desired behavior

OS and Version?

Linux codespaces-bfda10 6.2.0-1018-azure #18~22.04.1-Ubuntu SMP Tue Nov 21 19:25:02 UTC 2023 x86_64 GNU/Linux

azd version?

azd version 1.5.1 (commit 3856d1e98281683b8d112e222c0a7c7b3e148e96)

Versions

npm -version : 8.19.4

Mention any other details that might be useful

Is it possible that my Tenant/Subscription is not visibile because the GitHub CodeSpace is not a Managed Device in my Tenant? Thank you


Thanks! We'll be in touch soon.

mattgotteiner commented 10 months ago

If you are trying to login via Github Codespace, and your tenant admin requires only managed devices to log in using the command line, yes this could be a reason you can't login. You would only be able to deploy from a managed device in this case.

reneenoble commented 6 months ago

I am also getting this error, I'm working locally in VS Code Terminal. I have been able to deploy before (i.e. it worked yesterday).

I've followed the azd auth login prompt. I've also tried az account clear && az login to clear up any weird state issues. No luck.

tim-basic commented 1 week ago

Also getting these issues