SharePoint indexer - DocumentIntelligenceLayoutSkill produces error

Nikita DE BROUX (Sagacify) 0 Points de réputation
2025-03-26T10:50:15.41+00:00

Hello, I am trying to build a sharepoint indexer. The data from the sharepoint is then passed through a skillset with DocumentIntelligenceLayoutSkill. This skill is preceded by a custom skill to pass the correct data format (url format) to DocumentIntelligenceLayoutSkill (https://learn.microsoft.com/en-us/azure/search/cognitive-search-skill-document-intelligence-layout#data-limits).

"

"skills": [
{
  "@odata.type": "#Microsoft.Skills.Custom.WebApiSkill",
  "name": "#1",
  "description": "Custom skill to prepare data for layout intelligence",
  "context": "/document",
  "uri": "https://my-custom-skill.azurewebsites.net/api/-prepare-data-fct?code=[my_key]",
  "httpMethod": "POST",
  "timeout": "PT30S",
  "batchSize": 1000,
  "inputs": [
    {
      "name": "document_uri",
      "source": "/document/document_uri",
      "inputs": []
    }
  ],
  "outputs": [
    {
      "name": "layout_intelligence_data",
      "targetName": "layout_intelligence_data"
    }
  ],
  "httpHeaders": {}
},
{
  "@odata.type": "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill",
  "name": "my_document_intelligence_layout_skill",
  "context": "/document",
  "outputMode": "oneToMany",
  "markdownHeaderDepth": "h3",
  "inputs": [
    {
      "name": "file_data",
      "source": "/document/layout_intelligence_data",
      "inputs": []
    }
  ],
  "outputs": [
    {
      "name": "markdown_document",
      "targetName": "markdown_document"
    }
  ]
}
  ]

The indexer produces this error on EVERY documents in the SharePoint:

User's image

After some test, I identified that my custom skill is working fine and that the error is produced by the DocumentLayoutIntelligenceSkill.

My first thought was that the output of my custom skill was not correct but it seems to be the right format. Here is the ouput format of my custom skill:

{
    "values": [
        {
            "recordId": "a1",
            "data": {
                "layout_intelligence_data": {
                    "$type": "file",
                    "url": "url1 "
                }
            }
        },
        {
            "recordId": "b5",
            "data": {
                "layout_intelligence_data": {
                    "$type": "file",
                    "url": "url1 "
                }
            }
        }
    ]
}

I checked the logs of my function during indexer execution and the url are valid (I can access them). Do I need to give special rights in my skillset to access the sharepoint ? Knowing that that my Azure AI Search resource already has the permissions. Since debug plateform is not available for SharePoint datasource, I am pretty stuck at this point without any ways to get more information on the reason of this error.

Do you have any idea on what could cause such error ? I have already discarded custom skill, file size and extension (since not a single file pass the skill). My guess is on the authorization to download the file from the url for the skill but I have no way to confirm it.

Azure
Azure
Plateforme et infrastructure de cloud computing pour la génération, le déploiement et la gestion d’applications et de services à travers un réseau mondial de centres de données gérés par Microsoft.
483 questions
{count} votes

Votre réponse

Les réponses peuvent être marquées comme Réponses acceptées par l’auteur de la question, ce qui permet aux utilisateurs de connaître la réponse qui a résolu le problème de l’auteur.