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 Automate / Getting 400 error on H...
Power Automate
Unanswered

Getting 400 error on HTTP call to Sharepoint online

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi all,

I am trying to call Sharepoint REST API with MS Flow but I am getting always the same error "HTTP Error 400. The request hostname is invalid."

See the capture below:

cp1

It doesn't matter to wich endpoint I try to access or how many times I register my app (in Sharepoint and in my Azure tenant) I always get the same error. I have followed many blog posts like this : http://www.sharepointpals.com/post/Step-by-Step-Procedure-to-Call-SharePoint-Office-365-REST-API-from-Microsoft-Flow or answers in this same forum like this one: https://powerusers.microsoft.com/t5/Connecting-To-Data/How-to-get-Access-token-via-HTTP-action-in-Flow/m-p/82716/highlight/true#M2529

The token is well retrieved and passed to the url, is not a permissions issue because then I will get a different error (and because this same app credentials I used before to access to Sharepoint through CSOM methods and Powershell).

And of course the url is working perfectly as simple as it is.

This is how I parse the token and token type and I buid the http call:

 

cp3

cp2

 

 I would appreciate so much any thinking that you could have!

Thanks you

Categories:
I have the same question (0)
  • manuelstgomes Profile Picture
    6,625 on at

    HI @Anonymous 


    I just stumbled on your request. You've been waiting a while for a reply.

    Were you able to solve it? Can you post the solution so that we can all learn from it?

    If you still need help, please let me know what changed.

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    ​
    Cheers
    Manuel

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard