cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MariaL
Level: Powered On

Getting 400 error on HTTP call to Sharepoint online

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-fro... 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-Fl...

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

1 REPLY 1
Highlighted
Super User
Super User

Re: Getting 400 error on HTTP call to Sharepoint online

HI @MariaL 


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

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,914)