thanks VasaviLankipalle-MSFT - but that wasn't the issue I had 3 tenants in azure and 2 of them were named "default directory" - i removed the 2 that were redundant and it worked The API looks up the tenants and tries to find the key in the first "default directory" I guess - I had the same problem in Studio where I had to set the tenant every time so the solution is to have only 1 tenant in your azure account for now...
Document Intelligence AI returns 404
Hi I have created a document intelligence endpoint and I can see it in Azure Portal but I can't call an SDK API with that - https://document-intelligence-sami.cognitiveservices.azure.com/
It gives me a 404 Resource Not Found error The code:
document_intelligence_client = DocumentIntelligenceClient( endpoint=endpoint, credential=AzureKeyCredential(key))
with open(path_to_sample_documents, "rb") as f:
poller = document_intelligence_client.begin_analyze_document( "prebuilt-layout", analyze_request=f, content_type="application/octet-stream" )
In the Studio if I specify the "Service resource "resource" it works fine
But if I explicitly pass in the API key and URL, it gives me a 404 here too
I did have an issue with the "Default Directory" - do I need to specify in the API call as well?
2 answers
Sort by: Most helpful
-
-
VasaviLankipalle-MSFT 18,386 Reputation points
2024-01-31T01:23:53.6133333+00:00 Hello @sami jan , I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.
Issue: Document Intelligence AI returns 404 Resource Not Found error
Solution:
Try to check the tenants if you have multiple. In this issue they had 3 tenants in azure and 2 of them were named "default directory" - removed the 2 that were redundant, and it worked. Looks like the API looks up the tenants and tries to find the key in the first "default directory.
Other possibilities for this error are, since Public preview version 2023-10-31-preview is currently only available in the following Azure regions:
- East US
- West US2
- West Europe
The
404 Resource Not Found
error occur if you are trying to access the2023-10-31-preview
version of the Document Intelligence API from a region other than East US, West US2, or West Europe.If you have any other questions or are still running into more issues, please let me know.
Thank you again for your time and patience throughout this issue.
Regards,
VasaviPlease remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.