Share via

HTTP Call - Custom Extract and Classification URI

Anonymous
2025-11-13T20:50:30.5633333+00:00

Dear Support Team,
We are facing challenge in pulling PDF file extract data in Power Automate, when using HTTP Premium Post Call to Custom Extract and Classification modals

Since when we execute our flow and it keeps running state without sending back JSON output

Our POST Call:
https://east-us.api.cognitive.microsoft.com/formrecognizer/documentModels/PrimalEssenceExtract:analyze?api-version=2025-10-01
Headers
Ocp-Apim-Subscription-Key: Key1 or Key2 [Tried with both]
Content-Type: application/json

Method: POST

After Post we want to GET the analyzeResult as JSON record

Looking forward to help us resolve this step so we can create our records from our PDF received via email

Regards,
Rajesh

Azure Document Intelligence in Foundry Tools

Answer accepted by question author

Anonymous
2025-11-13T21:33:46.5566667+00:00

Hi Rajesh Lohana

Welcome to Microsoft Q&A and Thank you for reaching out.

A single POST call does not return the JSON result immediately it only starts the analysis and gives you an operation-location URL in the response headers. You need to follow these steps:

Correct Workflow for Custom Extract & Classification in Power Automate

  1. POST to Start Analysis

Endpoint:
https://east-us.api.cognitive.microsoft.com/formrecognizer/documentModels/PrimalEssenceExtract:analyze?api-version=2025-10-01

Headers

Ocp-Apim-Subscription-Key: <your key>

Content-Type: application/json

Body (example for PDF in Blob or Base64)

{
  "urlSource": "https://<your-storage-account>.blob.core.windows.net/<container  "urlSource": "https://<your-storage-account>.blob.core.windows.net/<container>/<file>.pdf"

Response: You will not get the JSON result here. Instead, you get:

202 Accepted operation-location: https://east-us.api.cognitive.microsoft.com/formrecognizer/documentModels/PrimalEssenceExtract/analyzeResults/<resultId>?api-version=2025-10-01

GET the Result

  • Use the operation-location URL from the header.
  • Make a GET request to that URL.
  • Keep polling until status becomes "succeeded" or "failed".
      {
        "status": "succeeded",
        "analyzeResult": {
          "documents": [
            {
              "fields": { ... },
              "confidence": 0.98
            }
          ]
        }
      }
    

How to Implement in Power Automate

  1. Step 1: HTTP POST → capture operation-location header.
  2. Step 2: Add a Do Until loop:
    • Inside loop: HTTP GET to operation-location.
    • Condition: body('GET')?['status'] equals "succeeded".
  3. Step 3: Parse JSON from analyzeResult and create your records.

Notes:

  1. If your flow hangs, it’s likely because you’re waiting for the POST to return JSON (it never will).
  2. Ensure you use async polling with the operation-location header.
  3. Check that your model name (PrimalEssenceExtract) exists and is trained/published.

I Hope this helps. Do let me know if you have any further queries.

Thank you!

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2025-11-14T04:33:00.9033333+00:00

    Thanks Sridhar for your quick reply
    All issues resolved.

    Thank you so much for clarifying in a very professional way

    Really Appreciated

    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.