-
Notifications
You must be signed in to change notification settings - Fork 129
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
Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired in 1.86.2 #960
Comments
Feedback: It appears you are encountering an authentication issue with the GenAI SDK, specifically related to an expired access token or incorrect audience. The error message indicates that the You've already tried setting the Additionally, ensure that your access token is up-to-date and has not expired. You can regenerate the token through the Azure portal under the appropriate OpenAI service settings. If the problem persists, consider reaching out to the GenAI support team for further assistance, providing them with the error trace located at Suggested Actions:
|
I did a change to clear the azure token; that may be it. I will send you a build to try out. |
Try v1.86.3 from the cli. |
Gave that a try with my 1+1 = 2 script { "statusCode": 401, "message": "Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired." } This is my current
|
I am able to repro... |
Try v1.84.4 . Turns out our proxy was behaving diferently from the raw AOAI layer. Test added. |
Fixed thanks so much! |
Issue
We've been using genaiscript samples from the documentation for git commit message and pull request descriptor from our
package.json
inside a node project.In
@latest
/@1.86.2
today we started receiving this errorTroubleshooting
Fix
Reverting to the last version resolves the issue
"gcm": "npx [email protected] run gcm",
"prd": "npx [email protected] run prd",
Environment Variable Experiment
I looked at the documentation and tried adding that token scope environment variable corresponding to our endpoint
AZURE_OPENAI_TOKEN_SCOPES=https://southcentralus.api.cognitive.microsoft.com/.default
but that did not resolve ithttps://microsoft.github.io/genaiscript/getting-started/configuration/#custom-token-scopes
I noticed navigating to that default without the
.default
https://cognitiveservices.azure.com/ is a site that can't be foundThe text was updated successfully, but these errors were encountered: