azure-search-openai-demo
azure-search-openai-demo copied to clipboard
ClientAuthenticationError: (PermissionDenied) Principal does not have access to API/Operation.
Please provide us with the following information:
This issue is for a: (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
- My organization already has a resource group with the necessary resources in them, i.e. app service, ai search, document intelligence etc.
- I'm owner of the resource group but I do not have the permission to create a new resource group - hence I cannot use
azd up. My plan is to create env variables locally, then index the documents and finallyaz webapp deploythe code to my existing app service. - So, locally, first I ran
azd auth loginand thenazd env setfor all the variables listed here and inmain.parameters.json - Next I ran
.\scripts\prepdocs.ps1which runsprepdocs.pyto create an index in azure ai search. But I get this error -Principal does not have access to API/Operation. - What am I missing here? I presume it has to do something with role assignments as I did not run
azd up?
@pamelafox any inputs from you will be highly appreciated!
Any log messages given by the failure
Loading azd .env file from current environment Creating python virtual environment ".venv" Installing dependencies from "requirements.txt" into virtual environment
Running "prepdocs.py" ./app/backend/prepdocs.py "\data*" --verbose --subscriptionid subscriptionid --storageaccount storageaccount --container container --storageresourcegroup storageresourcegroup --searchservice searchservice --index index --openaihost "" --openaimodelname "" --openaiservice openaiservice --openaideployment openaideployment --openaicustomurl "" --openaiorg "" --documentintelligenceservice documentintelligenceservice
\app\backend\prepdocs.py:221: SyntaxWarning: invalid escape sequence '*'
epilog="Example: prepdocs.py '.\data*' --storageaccount myaccount --container mycontainer --searchservice mysearch --index myindex -v",
Using local files: \data*
Ensuring search index index exists
Search index index already exists
Ingesting 'Test.pdf'
Extracting text from '\data\Test.pdf' using Azure Document Intelligence
Traceback (most recent call last):
File "\app\backend\prepdocs.py", line 479, in
Expected/desired behavior
OS and Version?
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
azd version?
run
azd versionand copy paste here.
Versions
azd version 1.9.6
Mention any other details that might be useful
Thanks! We'll be in touch soon.