How can I programmatically create a new Document Intelligence resource, and new project in that resource, in Java?

Michael Wei 0 Reputation points
2025-06-23T18:31:47.1+00:00

Like the header summarizes, my goal is to programmatically create a Document Intelligence resource and a new project in that resource in Java. I have been using the Azure Resource Manager, and was able to figure out how to programmatically create a new resource group, and manage storage accounts however was unable to figure out how to create the Document Intelligence resource due to seemingly outdated/conflicting documentation. For example, I have previously tried to use the Cognitive Services Manager to create the Doc Intelligence, which was unsuccessful as the withKind() syntax does not seem to work anymore and also have been unable to find any other possible solutions in the documentation. For reference, I am using Azure CLI Authentication.

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
2,100 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Manas Mohanty 5,620 Reputation points Microsoft External Staff Moderator
    2025-06-24T18:10:26.0166667+00:00

    Hi Michael Wei

    Thank you for confirming. I could not find any samples on creating Document intelligence resource using Java.

    But we can use CLI command to create document intelligence or other Cognitive service resources.

    az cognitiveservices account create \
        --name <resource-name> \
        --resource-group <resource-group-name> \
        --kind FormRecognizer \
        --sku <sku> \
        --location <location> \
        --yes
    

    Post which we can consume those endpoints with client initiated with key authorization.

    https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/how-to-guides/use-sdk-rest-api?view=doc-intel-4.0.0&tabs=windows&pivots=programming-language-java

    Please let us know if you can accept the limitation and consider this acceptable answer.

    Thank you

    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.