Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Flow Error: The response is not in a JSON format.

(0) ShareShare
ReportReport
Posted on by 10

So I know that there are tons of responses out there on this error but I am not finding the response I need or the fix I need so I am going to post this up under my specific situation.  

 

I have a flow that goes against Dataverse and the idea is to pull and SSRS report, push it to a PDF, and then email said PDF.  I found the steps here and they look legit:  https://reenhanced.com/2021/download-dynamics-365-reports-as-a-pdf-with-power-automate/ 

 

So here is my problem.  At the point of this process where I am downloading the PDF via the created URL is when I get the JSON error that I see here:

{
  "error": {
    "code": 302,
    "source": "flow-apim-unitedstates-002-eastus-01.azure-apim.net",
    "clientRequestId": "f55c3bc9-ad66-46fa-9e19-834533fd4668",
    "message": "The response is not in a JSON format.",
    "innerError": "<html><head><title>Object moved</title></head><body>\r\n<h2>Object moved to <a href=\"/_common/error/err.aspx?BackUri=&amp;ErrorCode=0x80048287&amp;Parm0=%0d%0a%0d%0a&amp;RequestUri=%2fReserved.ReportViewerWebControl.axd%3fReportSession%3dxjjfwhifrwnz5d55nbsn1szz%26Culture%3d1033%26CultureOverrides%3dTrue%26UICulture%3d1033%26UICultureOverrides%3dTrue%26ReportStack%3d1%26ControlID%3d1914e4cf91924830ad0d0b63b1580b31%26RSProxy%3dhttps%253a%252f%252fbn1700srs.nam.reporting.cds.dynamics.com%252freportserver%26OpType%3dExport%26FileName%3dMASB%2bInvoice%26ContentDisposition%3dAlwaysAttachment%26Format%3dPDF%26rc%3aPrintOnOpen%3dtrue&amp;user_lcid=1033\">here</a>.</h2>\r\n</body></html>\r\n"
  }
}
 
My flow looks like this in the area of pulling that URL:
bigjay_0-1693325092117.png

Looking at the failure, this is what I am seeing:

bigjay_1-1693325142919.png

 

The URL that is being used in the GET request:  /Reserved.ReportViewerWebControl.axd?ReportSession=xjjfwhifrwnz5d55nbsn1szz&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=1914e4cf91924830ad0d0b63b1580b31&RSProxy=https%3a%2f%2fbn1700srs.nam.reporting.cds.dynamics.com%2freportserver&OpType=Export&FileName=MASB+Invoice&ContentDisposition=AlwaysAttachment&Format=PDF&rc:PrintOnOpen=true

 

I have attempted to use Headers in the HTTP GET request of Accept: */* and Accept: application/json.  I have tried with both there and with each on their own.  

 

What am I missing or what simple step is missing in this?  

 

Thanks.

 

Jayson

  • jlarner Profile Picture
    10 on at
    Re: Flow Error: The response is not in a JSON format.

    Kind of forgot I had this question out there.  I did find a workable solution for this.  Turns out this pull can error out like this so the suggestion was "try again".  Since this is an automated process, I put the pull into a Do While loop to run until successful.  When it fails, historical tracking shows that it typically is within roughly 5 reattempts so I set my Do While to max out at 20 just in case.  I set a variable to be incremented only when the process completes properly and that breaks the Do While.

    bigjay_0-1695903067360.png

     

  • rina1 Profile Picture
    2 on at
    Re: Flow Error: The response is not in a JSON format.

    I have the same problem !

    did you found a solution?

    thank you

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,513 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,528 Most Valuable Professional

Leaderboard