Comments (13)
This often happens when the previous runs of "azd up" don't run to completion, since one of the last steps is to add roles for the currently logged-in user so the account can access the storage account, search service, etc. Did you try adding your self as blob contributor (in the storage account) and search contributor (in the search service)?
from azure-search-openai-demo.
that did it for me, thanks @pablocastro
from azure-search-openai-demo.
I'm seeing the exact same issue. I'm using WSL 2 on Windows 11 Enterprise.
I followed all the instructions exactly, except I had to use "azd login --use-device-code" instead of just "azd login". I didn't set any of the environment variables to use existing resources.
from azure-search-openai-demo.
same issue for me as well:
File "/workspaces/azure-search-openai-demo/MIPGPT/scripts/.venv/lib/python3.9/site-packages/azure/search/documents/indexes/_generated/operations/_indexes_operations.py", line 520, in get_next
raise HttpResponseError(response=response, model=error)
azure.core.exceptions.HttpResponseError: () Authorization failed.
Code:
Message: Authorization failed.
from azure-search-openai-demo.
That didn't work for me :( As far as I can tell, my user has blob contributor permissions in the storage account, and search countributor permissions in the search service. I get the error while doing "azd up". Here's the full stack for the error I get:
Running "prepdocs.py"
Ensuring search index gptkbindex exists
Traceback (most recent call last):
File "/home/bstollnitz/git/azure-search-openai-demo/./scripts/prepdocs.py", line 299, in
create_search_index()
File "/home/bstollnitz/git/azure-search-openai-demo/./scripts/prepdocs.py", line 237, in create_search_index
if args.index not in index_client.list_index_names():
File "/home/bstollnitz/git/azure-search-openai-demo/scripts/.venv/lib/python3.9/site-packages/azure/core/paging.py", line 132, in next
return next(self._page_iterator)
File "/home/bstollnitz/git/azure-search-openai-demo/scripts/.venv/lib/python3.9/site-packages/azure/core/paging.py", line 76, in next
self._response = self._get_next(self.continuation_token)
File "/home/bstollnitz/git/azure-search-openai-demo/scripts/.venv/lib/python3.9/site-packages/azure/search/documents/indexes/_generated/operations/_indexes_operations.py", line 520, in get_next
raise HttpResponseError(response=response, model=error)
azure.core.exceptions.HttpResponseError: () Authorization failed.
Code:
Message: Authorization failed.
ERROR: failed running post hooks: 'postprovision' hook failed with exit code: '1', Path: './scripts/prepdocs.sh'. : exit status 1
from azure-search-openai-demo.
I also tried to delete the resource group and start fresh, just in case something was corrupt from previous attempts, and I get the same error.
from azure-search-openai-demo.
I am also running into the same error. Many attempts, I am not sure what else I need to do.
from azure-search-openai-demo.
My solution was to get the credentials from https://portal.azure.com/ add them to the .env file that was created during the deployment and adjust scripts/prepdocs.sh#L21 so the additional variables get passed. You need to do that for Storage, Search and Formrecognizer.
from azure-search-openai-demo.
This issue is fixed on the new azd version.
You can try from a new empty folder and you should not have this issue anymore.
And to fix an existing project, you go to the .env
file from .azure/<env-name-folder>/.env
and delete the AZURE_PRINCIPAL_ID
entry. Then, the next time you run azd up
, the value will be populated again correctly.
from azure-search-openai-demo.
for me, added me Search Service Contributor as role in the search service. and then run azd up again and it worked.
from azure-search-openai-demo.
Same here. I have full admin permission of my own demo subscription. I can see the stack trace error when the script is executing command: azd auth token --output json --scope https://search.azure.com/.default --tenant-id {tenant-id}
. When I execute this command using same venv environment it returns without error. I am not sure why it fails in the script.
from azure-search-openai-demo.
Same here. I have full admin permission of my own demo subscription. I can see the stack trace error when the script is executing command:
azd auth token --output json --scope https://search.azure.com/.default --tenant-id {tenant-id}
. When I execute this command using same venv environment it returns without error. I am not sure why it fails in the script.
Resolved by forcing the environment proxy and recreate entire project using a different name.
from azure-search-openai-demo.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.
from azure-search-openai-demo.
Related Issues (20)
- Deleting The "ASK" tab HOT 1
- Search resource fails in swedencentral HOT 1
- Use "evaluation app" when the login is required in the "chat app" HOT 2
- Advanced RAG
- Chat answer layout differs in oai from deployment HOT 1
- I am not able to change the "Retrieval mode" in the UX
- Request for company Azure account (needed to get Azure OpenAI account) fails.
- Supporting files with apostrophy / punctuation mark in the file name HOT 3
- local running error: Incomplete environment configuration for EnvironmentCredential. HOT 3
- Error in login_and_acl.md when using ./script/manage.acl should be --document, not --url HOT 4
- adlsgen2setup fails three bugs - 1. cannot set AZURE_ADLS_GEN2_STORAGE_ACCOUNT 2. ./data/* should be ./data in adlsgensetup.sh and 3. Code changes required in adlsgensetup.py HOT 1
- Can we get some examples for AZURE_ADLS_GEN2_FILESYSTEM_PATH and how to use it in documentation please HOT 5
- Unauthorized Access to endpoints in production HOT 6
- Integration of a voice input and output option with Speech Services HOT 1
- CannotDeleteOrUpdateEnabledEntitlement: Permission (scope or role) cannot be deleted or updated unless disabled first
- Is there a way not to use DI? HOT 1
- Index not found - looks like hooks are not fired up HOT 5
- How to upload data with DI in portal? HOT 5
- How to change the azure subscription to a new one HOT 3
- Weird/unexpected error with APIM load balancer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-search-openai-demo.