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
5.9k stars 4.04k forks source link

Could not execute skill because the Web Api request failed. #1303

Open singloudly90 opened 6 months ago

singloudly90 commented 6 months ago

Please provide us with the following information:

This issue is for a: (mark with an 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)
- [x] indexer runnning issue

Minimal steps to reproduce

Any log messages given by the failure

Could not execute skill because the Web Api request failed. Web Api response status: 'Unauthorized', Web Api response details: '{"error":{"code":"PermissionDenied","message": "Principal does not have access to API/Operation."}}'

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

azd version?

run azd version and copy paste here.

Versions

Mention any other details that might be useful

When I enable the intvectorization, the creation of skillset, index and indexer is successful however, having issue in running the indexer,even though i manually tag the skillset to the indexer and rerun again using Azure Portal. What is the web api permission did i need to solve this issue?

Thank you.


Thanks! We'll be in touch soon.

pamelafox commented 6 months ago

cc @srbalakr to look into this

srbalakr commented 6 months ago

@singloudly90 did you run azd up ? Can you verify if 'searchservice' managed identity is granted permission with aoai service ?

singloudly90 commented 6 months ago

@srbalakr thanks for your reply. if i create resources from portal , i would need to configure Search Apps for Microsoft Entra ID and enable managed identities am i correct? I am using existing resources for my enterprise..

pamelafox commented 6 months ago

If you created resources in the Portal, then you should follow the steps in the README to use existing resources (https://github.com/Azure-Samples/azure-search-openai-demo?tab=readme-ov-file#using-existing-azure-resources) and then run azd up. The azd up process will create necessary roles and make connections. If you don't use azd up, then you have to study the Bicep to figure out what other changes to make, so I strongly recommend azd up.

singloudly90 commented 6 months ago

@pamelafox if i does not has permission do role assignment.. does azd up still will work? thank you..

pamelafox commented 6 months ago

Unfortunately, no, as discussed in the account prerequisites: https://github.com/Azure-Samples/azure-search-openai-demo?tab=readme-ov-file#azure-account-requirements

There are some suggestions there as to the minimum permissions possible that your IT group may be able to grant, but you still need some level of RBAC permissions.

dchandu320 commented 4 months ago

@pamelafox , @srbalakr

I am following the same approach for creation of skillsets, Indexer and Index by enabling intvectorization to True. Old approach took long time for creating indexes for huge data, does this approach or feature helps in reducing the time consumption as well whenever we create indexes for huge data. Could you please confirm.