semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

OpenAI token authentication fails in AzureUSGovernment cloud

Open ebclark2 opened this issue 1 year ago • 2 comments

Describe the bug OpenAI token authentication fails in AzureUSGovernment cloud with invalid token/audience error.

To Reproduce In AzureUSGovernment configure OpenAI Auth type to "AzureIdentity" and provide a valid idenitty.

Expected behavior OpenAI calls authenticate successfully.

Screenshots image

Platform

  • OS: All
  • IDE: [e.g. Visual Studio, VS Code]
  • Language: [e.g. C#, Python]
  • Source: [e.g. NuGet package version 0.1.0, pip package version 0.1.0, main branch of repository]

Additional context See OpenAIClient Issue

ebclark2 avatar May 14 '24 16:05 ebclark2

@ebclark2 Thanks for creating the issue. Does this scenario work if you use the Azure OpenAI SDK directly?

markwallace-microsoft avatar May 15 '24 08:05 markwallace-microsoft

No, it does not. I was able to confirm the problem is the token scope. It works if I build a new version of the openai SDK with the correct scope.

On Wed, May 15, 2024, 4:08 AM Mark Wallace @.***> wrote:

@ebclark2 https://github.com/ebclark2 Thanks for creating the issue. Does this scenario work if you use the Azure OpenAI SDK https://www.nuget.org/packages/Azure.AI.OpenAI/1.0.0-beta.17 directly?

— Reply to this email directly, view it on GitHub https://github.com/microsoft/semantic-kernel/issues/6255#issuecomment-2111848927, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGIEZB7ED6272W4UQA64RDZCMJYBAVCNFSM6AAAAABHWQFPAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJRHA2DQOJSG4 . You are receiving this because you were mentioned.Message ID: @.***>

ebclark2 avatar May 15 '24 09:05 ebclark2

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Aug 14 '24 01:08 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Aug 28 '24 01:08 github-actions[bot]