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

Getting 400 error on HTTP call to Sharepoint online

(1) ShareShare
ReportReport
Posted on by

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

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard