Giter Club home page Giter Club logo

Comments (13)

pablocastro avatar pablocastro commented on May 20, 2024 6

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.

alf233 avatar alf233 commented on May 20, 2024 1

that did it for me, thanks @pablocastro

from azure-search-openai-demo.

bstollnitz avatar bstollnitz commented on May 20, 2024

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.

alf233 avatar alf233 commented on May 20, 2024

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.

bstollnitz avatar bstollnitz commented on May 20, 2024

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.

bstollnitz avatar bstollnitz commented on May 20, 2024

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.

marknhenry avatar marknhenry commented on May 20, 2024

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.

gregorwolf avatar gregorwolf commented on May 20, 2024

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.

vhvb1989 avatar vhvb1989 commented on May 20, 2024

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.

JahvoTrust avatar JahvoTrust commented on May 20, 2024

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.

rexpie avatar rexpie commented on May 20, 2024

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.

jiabinxia-sanofi avatar jiabinxia-sanofi commented on May 20, 2024

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.

github-actions avatar github-actions commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.