web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Parsed JSON contains d...
Power Automate
Unanswered

Parsed JSON contains data, but values are blank when called in flow

(1) ShareShare
ReportReport
Posted on by 104

I have a flow sending an HTTP request to MS Graph api:

 

teespolyglot_0-1676236466576.png

 

which works fine and gets a response with an access token, as expected. I then parse the body of the HTTP and the JSON output contains the expected data.

 

When i then try to use the outputs of the Parse JSON, however, all the values are blank:

 

teespolyglot_2-1676236776274.png

 

I don't understand how this can be, and I've exhausted every avenue i can think of to try and extract the data. Any help would be appreciated

Categories:
I have the same question (0)
  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @teespolyglot 

    Can you send the expression of the failed compose data operation?

  • teespolyglot Profile Picture
    104 on at

    Apologies, the second screenshot I posted was not the output of the flow in the first screenshot. The flow I showed in the first screenshot, where the input of Compose is

     

     

    {
     "inputs": "@body('Parse_JSON_2')?['body']?['access_token']",
     "metadata": {
     "operationMetadataId": "b1cf826e-4194-40c9-a31f-551c7522b4f8"
     }
    }

     

     

    results in the following, where the Compose operation is successful, but the input and output are empty

     

    teespolyglot_0-1676241508693.png

     

    Many thanks for your assistance! 🙂

     

  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @teespolyglot 

    Are you sure it is Empty? Have you clicked on Download

    Can you send me the output of the HTTP request so I can replicate at my end?

     

     

  • teespolyglot Profile Picture
    104 on at

    Yes, I'm 100% sure. I've tried outputting to compose, setting it as a variable, referencing the parsed json directly, and clicking download for either input or output opens about:blank in the browser

     

    I've sent you the http output by DM. Thanks for your help

  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @teespolyglot 

    I could get the access token directly like below

    Mira_Ghaly_0-1676251220271.png

     

    Schema I used for the ParseJson

    {
     "type": "object",
     "properties": {
     "statusCode": {
     "type": "integer"
     },
     "headers": {
     "type": "object",
     "properties": {
     "Pragma": {
     "type": "string"
     },
     "Strict-Transport-Security": {
     "type": "string"
     },
     "X-Content-Type-Options": {
     "type": "string"
     },
     "x-ms-request-id": {
     "type": "string"
     },
     "x-ms-ests-server": {
     "type": "string"
     },
     "X-XSS-Protection": {
     "type": "string"
     },
     "Cache-Control": {
     "type": "string"
     },
     "P3P": {
     "type": "string"
     },
     "Set-Cookie": {
     "type": "string"
     },
     "Date": {
     "type": "string"
     },
     "Content-Length": {
     "type": "string"
     },
     "Content-Type": {
     "type": "string"
     },
     "Expires": {
     "type": "string"
     }
     }
     },
     "body": {
     "type": "object",
     "properties": {
     "token_type": {
     "type": "string"
     },
     "scope": {
     "type": "string"
     },
     "expires_in": {
     "type": "string"
     },
     "ext_expires_in": {
     "type": "string"
     },
     "expires_on": {
     "type": "string"
     },
     "not_before": {
     "type": "string"
     },
     "resource": {
     "type": "string"
     },
     "access_token": {
     "type": "string"
     },
     "refresh_token": {
     "type": "string"
     }
     }
     }
     }
    }
  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @teespolyglot 

    Please check below

    Mira_Ghaly_1-1676251399677.png

    This is returning value for me

     

  • teespolyglot Profile Picture
    104 on at

    I could also get the access token. The problem is that even though the JSON has values, when i use the JSON output, the values are empty. The following uses the same schema and compose:

     

    teespolyglot_1-1676251871401.png

     

     

    teespolyglot_0-1676251808307.png

     

  • Mira Ghaly Profile Picture
    11,413 Moderator on at

    @teespolyglot 

    That's pretty weird I have replicated the same and it is showing the value correctly 

  • Verified answer
    teespolyglot Profile Picture
    104 on at

    After searching extensively, i solved the issue by amending the schema for the parse json action to:

     

     

    {
     "type": "object",
     "properties": {
     "token_type": {
     "type": "string"
     },
     "scope": {
     "type": "string"
     },
     "expires_in": {
     "type": "string"
     },
     "ext_expires_in": {
     "type": "string"
     },
     "expires_on": {
     "type": "string"
     },
     "not_before": {
     "type": "string"
     },
     "resource": {
     "type": "string"
     },
     "access_token": {
     "type": "string"
     },
     "refresh_token": {
     "type": "string"
     }
     }
    }

     

     

    For anyone else who encounters this error, I realised this must be due to an error in the JSON schema and I ultimately found the correct schema by following the below process:

     

    1. Parse JSON with HTTP body as input
    2. Initialize variable, type: Object, taking the body of Parse JSON as the input
    3. Second Parse JSON action, taking the variable as input, and using the output body from the first Parse JSON action as a payload for the schema
    4. Compose action using the access token item from the second Parse JSON as input (to verify that the schema used in the second Parse JSON works).
    5. If the compose action produces a result in testing, the schema used for the second Parse JSON action can be pasted into the first Parse JSON, and subsequently the initialise variable, second parse json and compose action can all be removed, and simply use the access token that should now be generated successfully by the first Parse JSON 🙂
  • 365-Assist Profile Picture
    2,324 Moderator on at

    @teespolyglot I had the same issue and your response was really helpful. 

    Here is my Flow design for anyone else who has this issue:

     

    In my case I was looking for the value of Response in the Body of the HTTP response:

    365Assist_0-1684026856585.png

    My Compose Action is:

    "inputs": "@body('Parse_JSON')?['response']"

     

     

    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
    Twitter: https://twitter.com/assist_365

    Regards
    Darren Lutchner - 365 Assist

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard