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 Automate - Building Flows
Suggested answer

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
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    989 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard