getting error- The request is invalid. Details: Cannot dynamically create an instance of type 'Microsoft.Azure.Search.DataIdentity'. Reason: Cannot create an abstract class.

Amrita Madhav 5 Reputation points
2024-07-11T13:23:08.38+00:00

I am trying to create a custom web api skillset to connect to document intelligence directly. Created a skillset definition but it throws below error -

The request is invalid. Details: Cannot dynamically create an instance of type 'Microsoft.Azure.Search.DataIdentity'. Reason: Cannot create an abstract class. 

User's image

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,016 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,561 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,940 questions
Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,678 questions
{count} vote

1 answer

Sort by: Most helpful
  1. ajkuma 26,216 Reputation points Microsoft Employee
    2024-07-16T19:07:04.22+00:00

    Apologies for the delayed response. Just checking if it's working fine?

    Based on my understanding of your issue, kindly check the sample:

    If you're looking to implement authentication for your custom web API skill within a skillset, you might consider using the authResourceId property. This property is part of the skillset definition that enables Azure AI Search to authenticate to your custom web API using Managed Identity.

    {
      "@odata.type": "#Microsoft.Skills.Custom.WebApiSkill",
      "description": "A custom skill that can identify positions of different phrases in the source text",
      "uri": "https://contoso.count-things.com",
      "batchSize": 4,
      "context": "/document",
      "inputs": [
        {
          "name": "text",
          "source": "/document/content"
        },
        {
          "name": "language",
          "source": "/document/languageCode"
        },
        {
          "name": "phraseList",
          "source": "/document/keyphrases"
        }
      ],
      "outputs": [
        {
          "name": "hitPositions"
        }
      ]
    }
    

    Checkout this similar SO discussion thread:

    Just to highlight,

    • Review your skillset definition and make sure it adheres to the expected structure.
    • If you’re using any custom code or extensions, ensure they handle the correct class instantiation

    Kind let us know, I'll follow-up with you further.

    0 comments No comments

Your answer

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