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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Error When adding requ...
Power Automate
Unanswered

Error When adding required JSON Body to HTTP Graph API call

(0) ShareShare
ReportReport
Posted on by
Hi
I am building flow to help with Automating add the Approvers to my PIM setup via MS Graph API.
 
The Flow might seem complicated but all I am doing is Taking a Groups display name and Getting the relevant Policy ID for PIM.
 
The last part of the Flow is another HTTP call to Graph API to add approvers.
 
When I add the Body it gives this error (The input parameter(s) of operation 'For_each' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'For_each'.)  
and won't save the flow.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Before blaming the "For Each" mentioned in the error
I can save the flow without the body.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
To add salt onto the wound of this error. 
I can Run the command in Post Man without any problems or error.
 
Any Help will be greatly appreciated as its driving me up the wall
Categories:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    Error When adding required JSON Body to HTTP Graph API call
    Try replacing all your "@odata.type" keys with "@@odata.type".  It's a special character and doubling it is a way to escape it when trying to send it in an HTTP as a payload.

    https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language



    In the past I've also done things like putting the @ in a variable and refrencing it in the JSON.

    ​​​​​​​​​​​​​​If this helps please mark as accepted answer, thanks!

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

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard