cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,550)