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 / Power Automate Parse J...
Power Automate
Unanswered

Power Automate Parse JSON error. Invalid type. Expected Object but got Array

(0) ShareShare
ReportReport
Posted on by 546

Hi PA People,

 

I've been working on a flow from a test list which works fine, and now moving it into production, and I'm getting the error of "Invalid Type, Expected Object but got Array".

 

I always seem to trip over Parse JSON syntax.  The flow runs daily and goes a Get Items action with an oData filter of anniversary date = today.

smorley_0-1678450834128.png

Next I select the Department Administrator.

smorley_1-1678450880033.png

I then initialize my array variable with a union statement.

union(body('Select_Department_Administrator'), body('Select_Department_Administrator'))

smorley_2-1678450935226.png

Next my Parse JSON statement uses the array variable as the content.

smorley_4-1678451214284.png

 

The schema is below:

{
"type": "array",
"items": {
"type": "object",
"properties": {
"Claims": {
"type": ["string", "null"]
},
"DisplayName": {
"type": ["string", "null"]
},
"Email": {
"type": ["string", "null"]
},
"Picture": {
"type": ["string", "null"]
},
"Department": {
"type": ["string", "null"]
},
"JobTitle": {
"type": ["string", "null"]
},
"@odata.type": {
"type": ["string", "null"]
}
},
"required": [
"@odata.type",
"Claims",
"DisplayName",
"Email",
"Picture",
"Department",
"JobTitle"
]
}
}

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    The schema you listed isn't the schema that is showing in the Parse JSON screenshot.  Check the schema and you should be fine.  The one you list starts 

     

    {
    "type": "array",
    "items": {

     

    But the one in the screenshot shows

     

    {
    "type": "object",
    "properties": {

     

  • smorley Profile Picture
    546 on at

    Well @Pstork1 I did make it work based on your post.  Thanks.  Here's the weird thing.  My test flow here's the output from the JSON action.  This is the one that works.

    smorley_0-1678452390225.png

    In the production flow, with the same syntax.  It fails.

    I swapped out "array" with "object" like you suggested, saved it, and ran it, and it now works fine.

    When I go look at it after I've saved, it looks like it did when it failed.

    smorley_1-1678452692409.png

    I'm glad you got it to work for me, but I'm a little mystified by it.

     

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Its not just the type array that is different in the production schema.  I would copy the whole schema from test, paste it into production and save it.  Then test production.

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard