azure-search-openai-demo: APIError Invalid response object from API: '{ "statusCode": 401, "message": "Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired." }' (HTTP response code was 401))>
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
After ingesting a large amount of documents via prep docs (100ish) I receive this error. This error occurs after being rate limited. It will usually recover successfully but after a second round of rate limiting, I run into this error. I have removed max retries and adjusted the timeout in the AzureDeveloperCliCredential call but that does not seem to help.
Any log messages given by the failure
APIError Invalid response object from API: ‘{ “statusCode”: 401, “message”: “Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired.” }’ (HTTP response code was 401))>
Expected/desired behavior
Expected behavior would be for the program to recover after rate limit and not lose credentials.
OS and Version?
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Windows 11
azd version?
run
azd versionand copy paste here.
azd version 1.1.0 (commit ea9cb12575734ee6a5f99c4d415c1a51d6f32d3e)
Versions
Using latest commit from repo.
Mention any other details that might be useful
Any guidance would be appreciated!
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 30 (3 by maintainers)
I am experiencing this same issue
It looks like the active tenant is correct, so you could check your access. Go into the portal, find the relevant Azure OpenAI resource, and click “Check my access”.
This is basically the same issue as https://github.com/Azure-Samples/azure-search-openai-demo/issues/431 Please see that issue for some suggestions
me and my colleagues are experiencing similar issue