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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Http request failed: t...
Power Apps
Answered

Http request failed: the content was not a valid JSON.

(1) ShareShare
ReportReport
Posted on by 10
Hi! 
 
I'm trying to use a HTTP connector to invoke one of our Azure Functions and I'm getting the following error message: 
 
BadRequest. Http request failed: the content was not a valid JSON. Error while parsing JSON: 'Unexpected character encountered while parsing value: <. Path '', line 0, position 0.'
 
I'm not seeing the "<" character anywhere in the JSON data that is being submitted or returned! 
 
Has anyone experienced this?  Please advise. 
 
Thanks! 
 
E. 
 
Categories:
I have the same question (0)
  • Nandit Profile Picture
    1,568 Moderator on at
     
    It would be great if you can share some screenshots / information about the Power Apps trigger value and the payload you are sending. 
     
    Kind regards, 
    Nandit
  • EM-22101504-0 Profile Picture
    10 on at
    Hi! 
     
    Thanks for your reply, Nandit
     
    I have no problem invoking the Azure Function from Postman: 
     
     
    The error is occurring in the HTTP control in Power Automate: 
     
     
    Should I be able to configure this just as I have in Postman? 
     
     
    Also, is this error message really referring to a "<" character somewhere in the code/the payload? 
     
    Thanks! 
     
    E. 
     
  • MarkRahn Profile Picture
    1,364 Super User 2026 Season 1 on at
    Hi,
     
    As Nandit has pointed out, screenshots would be helpful. If that is not something you can provide, then here are some other things you can do:
     
    1. Check the endpoint. Ensure that the URL in the HTTP call is correct.
    2. Use a tool like Postman to make the HTTP call with the same Headers and Body. Postman may provide you with more details on the issue.
    3. Test the Azure function from Azure Portal. You should be able to validate and verify the needed headers, parameters, and body.
     
    I hope you are able to locate the problem as it can be frustrating when the error messages seem to be confusing.
     
    -Mark
  • EM-22101504-0 Profile Picture
    10 on at
    Hi, Nandit and MarkBandR
     
    Sorry, my first posting to this forum! 
     
    I posted some screenshots.  Do you not see these? 
     
    Please advise if you are not seeing them. 
     
    Thanks! 
     
    E. 
     
     
     
  • Verified answer
    MarkRahn Profile Picture
    1,364 Super User 2026 Season 1 on at
    Hi,
     
    Here is the short answer. I was able to duplicate your error.
     
    You have the wrong values for Authority and Audience. Authority should be "https://login.microsoftonline.com" and the Audience should be "api://<yourclientid>"
     
    Long story short, I built a simple Azure Function and added Microsoft as an Identity Provider under Settings-Authentication. I created an Identity with a Client ID and Secret. I got everything to work and then worked backward adjusting the fields till I saw your error. 
    Http request failed: the content was not a valid JSON. Error while parsing JSON: 'Unexpected character encountered while parsing value: <. Path '', line 0, position 0.'
     
    This is how my HTTP Action looks: Obviously replace all the <> with your values.


    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a Like.
     
    Thanks
    -Mark
     
    PS - I don't know if you need to but the reply you sent shows your function url in the Audience field. You may want to edit and remove that from your reply.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 834

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard