Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure openai cognitive search chat extension not working with azidentity authentication #21631

Closed
BlauerPulli opened this issue Sep 27, 2023 · 3 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team OpenAI

Comments

@BlauerPulli
Copy link

Bug report

  • azopenai version v0.3.0
  • azidentity version v1.3.1
  • go version 1.21

Hey, i am using my gpt model deployed in a azure openai instance via DefaultAzureCredential mechanism from the azidentity package which works very well with my local az login + managed identity of the hosted application.
If i now extend the chatcompletions request with options for using my cognitive search index it only works if i add the required marked search key. This shouldn't be the case if the authentication workflow for the whole openai client works properly. To exclude azure rbac issues i assigned the openai instances identity also owner permissions over the resource group that contains the whole setup.

Additional Info (not really know if this is helpful here):
Found the cognitive search setting API access control under Keys to which was per default API keys. It dropped this error:
Invalid AzureCognitiveSearch configuration detected: Azure Search Error: 403, message='Server responded with status 403. Error message: ', url=URL('<instance-url>/indexes/<index-name>?api-version=2021-04-30-Preview')\nServer responded with status 403.

Switch it to Both this error message appears:
Error with API access control is: Gateway cannot authenticate upstream services. Please contact Microsoft for help.

Thanks in advance for your help!

@github-actions github-actions bot added Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 27, 2023
@jhendrixMSFT jhendrixMSFT added OpenAI and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that needs-team-triage Workflow: This issue needs the team to triage. labels Sep 27, 2023
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Sep 27, 2023
@richardpark-msft
Copy link
Member

@trrwilson, do you know if this setup is intended to work with Identity? Or is using an APIKey the only way it works?

@trrwilson
Copy link
Member

Thanks for the tag, @richardpark-msft ! @BlauerPulli -- thank you for the detailed description and it's certainly nothing on your end; the Use Your Data feature (via the underlying /extensions/chat/completions REST route) currently only handles linked resource authentication via API key use. Incorporating other authentication options is something the feature team is actively investigating and, while we can't yet put an ETA in writing, we're optimistic it'll be "soon."

@BlauerPulli
Copy link
Author

Hey @trrwilson, thanks for the answer. It's nice to hear that this will coming soon!

@chlowell chlowell removed their assignment Sep 29, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team OpenAI
Projects
None yet
Development

No branches or pull requests

5 participants