An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
Hello INFOSOFT,
Thank you for reaching out Microsoft Q&A.
Based on the error:
{
"error": {
"code": "NotFound",
"message": "Resource not found.",
"innererror": {
"code": "ModelNotFound",
"message": "The requested model was not found."
}
}
}
and the fact that the model works correctly inside Document Intelligence Studio, this typically indicates that the API request is not reaching the correct trained model endpoint or model identifier.
The RBAC assignments you shared appear generally unrelated to this specific “ModelNotFound” error, because this error usually occurs before storage-access validation.
The issue is commonly caused by one of the following:
Incorrect model ID, Wrong endpoint URL or API path, Region/resource mismatch, Incorrect API version, Calling a different Document Intelligence resource than the one where the model was trained
Please review the following checks carefully:
- Verify the exact model ID
After training, please copy the exact model ID directly from Document Intelligence Studio instead of manually typing it.
• Model IDs are case-sensitive
• Ensure there are no extra spaces or hidden characters
• Verify that you are using the actual model ID and not the display name
You can also validate this by listing available models:
GET https://<resource-name>.cognitiveservices.azure.com/documentintelligence/documentModels?api-version=2024-11-30
Please confirm that your model appears in the returned list.
Confirm the correct endpoint and API path
For API version 2024-11-30, the endpoint format should look similar to:
POST https://<resource-name>.cognitiveservices.azure.com/documentintelligence/documentModels/<model-id>:analyze?api-version=2024-11-30
or
POST https://<resource-name>.documentintelligence.azure.com/documentintelligence/documentModels/<model-id>:analyze?api-version=2024-11-30
A common issue is using older endpoint paths such as:
/formrecognizer/
instead of the newer:
/documentintelligence/
when using recent API versions.
Verify the resource and region match
Common cause is model trained in Resource A but API request sent to Resource B
Even if subscription, storage account, and RBAC are correct, models are scoped to the specific Azure Document Intelligence resource where they were trained.
Please ensure the Studio project, endpoint URL, API key/token, and region all belong to the same Document Intelligence resource.
Test model retrieval directly
Please test the following API:
GET https://<resource-name>.cognitiveservices.azure.com/documentintelligence/documentModels/<model-id>?api-version=2024-11-30
If this also returns: • ModelNotFound then the request is almost certainly targeting: the wrong resource, incorrect model ID, or incorrect endpoint path.
Verify authentication and permissions
The RBAC roles you shared are primarily related to training data access, storage access, and resource management.
However, inference calls require access to the Document Intelligence resource itself.
Please ensure the calling identity/service principal has appropriate access such as Cognitive Services User or Contributor
on the Azure Document Intelligence resource.
Please first validate the exact model ID, endpoint URL, API version, and whether the API is targeting the same resource used during training.
In most cases, this issue is resolved after correcting the endpoint/resource mismatch or using the proper model ID.
Please refer this
Document Intelligence REST API: https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/concept/analyze-document-response?view=doc-intel-4.0.0
Document Intelligence Studio: https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/studio-overview?view=doc-intel-4.0.0&tabs=di-studio
Resolving 404 Resource Not Found Error https://learn.microsoft.com/azure/ai-services/document-intelligence/how-to-guides/resolve-errors?view=doc-intel-4.0.0
Analyze document (v4) REST API https://learn.microsoft.com/rest/api/aiservices/document-models/analyze-document?view=rest-aiservices-v4.0+%282024-11-30%29
I Hope this helps. Do let me know if you have any further queries.
Thank you.