Error encountered during POST: {"error":{"code":"NotFound","message":"Resource not found.","innererror":{"code":"ModelNotFound","message":"The requested model was not found."}}}

INFOSOFT 0 Reputation points
2026-05-25T10:58:05.22+00:00

Document intelligence,
I have trained one model, which works ok in studio, but API error - Model not found

Version 2024-11-30
endpoint, service, model name spelling, all ok
RBAC
[

{

"RoleAssignmentId": "dummy-roleassignmentid-1",

"Scope": "/subscriptions/dummy-subscription-id/resourceGroups/dummy-resourcegroup/providers/Microsoft.Storage/storageAccounts/dummystorageaccount",

"DisplayName": "DummyApp",

"SignInName": "",

"RoleDefinitionName": "Contributor",

"RoleDefinitionId": "/subscriptions/dummy-subscription-id/providers/Microsoft.Authorization/roleDefinitions/dummy-roledefinitionid",

"ObjectId": "dummy-objectid-1",

"ObjectType": "ServicePrincipal",

"RoleAssignmentDescription": "",

"ConditionVersion": "",

"Condition": ""

},

{

"RoleAssignmentId": "dummy-roleassignmentid-2",

"Scope": "/subscriptions/dummy-subscription-id/resourceGroups/dummy-resourcegroup/providers/Microsoft.Storage/storageAccounts/dummystorageaccount",

"DisplayName": "DummyApp",

"SignInName": "",

"RoleDefinitionName": "Owner",

"RoleDefinitionId": "/subscriptions/dummy-subscription-id/providers/Microsoft.Authorization/roleDefinitions/dummy-roledefinitionid",

"ObjectId": "dummy-objectid-1",

"ObjectType": "ServicePrincipal",

"RoleAssignmentDescription": "",

"ConditionVersion": "",

"Condition": ""

},

{

"RoleAssignmentId": "dummy-roleassignmentid-3",

"Scope": "/subscriptions/dummy-subscription-id/resourceGroups/dummy-resourcegroup/providers/Microsoft.Storage/storageAccounts/dummystorageaccount",

"DisplayName": "DummyApp",

"SignInName": "",

"RoleDefinitionName": "Storage Blob Data Reader",

"RoleDefinitionId": "/subscriptions/dummy-subscription-id/providers/Microsoft.Authorization/roleDefinitions/dummy-roledefinitionid",

"ObjectId": "dummy-objectid-1",

"ObjectType": "ServicePrincipal",

"RoleAssignmentDescription": "",

"ConditionVersion": "",

"Condition": ""

},

{

"RoleAssignmentId": "dummy-roleassignmentid-4",

"Scope": "/subscriptions/dummy-subscription-id",

"DisplayName": "DummyTenant",

"SignInName": "******@dummy.onmicrosoft.com",

"RoleDefinitionName": "Owner",

"RoleDefinitionId": "/subscriptions/dummy-subscription-id/providers/Microsoft.Authorization/roleDefinitions/dummy-roledefinitionid",

"ObjectId": "dummy-objectid-2",

"ObjectType": "User",

"RoleAssignmentDescription": "",

"ConditionVersion": "",

"Condition": ""

},

{

"RoleAssignmentId": "dummy-roleassignmentid-5",

"Scope": "/subscriptions/dummy-subscription-id/resourceGroups/dummy-resourcegroup/providers/Microsoft.Storage/storageAccounts/dummystorageaccount",

"DisplayName": "dummy-trained-model",

"SignInName": "",

"RoleDefinitionName": "Storage Blob Data Reader",

"RoleDefinitionId": "/subscriptions/dummy-subscription-id/providers/Microsoft.Authorization/roleDefinitions/dummy-roledefinitionid",

"ObjectId": "dummy-objectid-3",

"ObjectType": "ServicePrincipal",

"RoleAssignmentDescription": "",

"ConditionVersion": "",

"Condition": ""

},

{

"RoleAssignmentId": "dummy-roleassignmentid-6",

"Scope": "/subscriptions/dummy-subscription-id/resourceGroups/dummy-resourcegroup",

"DisplayName": "DUMMY USER",

"SignInName": "******@dummy.onmicrosoft.com",

"RoleDefinitionName": "Contributor",

"RoleDefinitionId": "/subscriptions/dummy-subscription-id/providers/Microsoft.Authorization/roleDefinitions/dummy-roledefinitionid",

"ObjectId": "dummy-objectid-4",

"ObjectType": "User",

"RoleAssignmentDescription": "Developer - ",

"ConditionVersion": "",

"Condition": ""

}

]

But still getting

response

{
    "error": {
        "code": "NotFound",
        "message": "Resource not found.",
        "innererror": {
            "code": "ModelNotFound",
            "message": "The requested model was not found."
        }
    }
}
Azure Document Intelligence in Foundry Tools

1 answer

Sort by: Most helpful
  1. SRILAKSHMI C 19,555 Reputation points Microsoft External Staff Moderator
    2026-05-25T15:35:26.7933333+00:00

    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:

    1. 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.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.