Share via

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. Amira Bedhiafi 41,966 Reputation points MVP Volunteer Moderator
    2026-05-25T11:14:50.1133333+00:00

    Hello !

    Thank you for posting on MS Learn Q&A.

    The Document Intelligence endpoint you are calling cannot see that model. Microsoft’s error reference says ModelNotFound means the model was not found, deleted, or still building.

    https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/how-to-guides/resolve-errors?view=doc-intel-4.0.0

    The first thing to check is whether the model is visible from the same endpoint and API version you are using for the POST call.

    Run:

    GET https://<your-endpoint>.cognitiveservices.azure.com/documentintelligence/documentModels?api-version=2024-11-30
    

    The list models API should return both prebuilt models and your custom model with its modelId. (Microsoft Learn)

    Then test the exact model:

    GET https://<your-endpoint>.cognitiveservices.azure.com/documentintelligence/documentModels/<modelId>?api-version=2024-11-30
    

    If the custom model is not returned then the API call is going to a different Document Intelligence resource or region than the one used in Studio or the model is not available, deployed or ready for that resource.

    For 2024-11-30, the analyze URL should be:

    POST https://<your-endpoint>.cognitiveservices.azure.com/documentintelligence/documentModels/<modelId>:analyze?_overload=analyzeDocument&api-version=2024-11-30
    

    with either:

    {
      "urlSource": "https://..."
    }
    

    or:

    {
      "base64Source": "..."
    }
    

    The v4 API uses /documentintelligence/documentModels/{modelId}:analyze and requires the modelId not the display name shown in Studio.

    https://learn.microsoft.com/en-us/rest/api/aiservices/document-models/analyze-document?view=rest-aiservices-v4.0+%282024-11-30%29

    Was this answer helpful?

    0 comments No comments

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.