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 / Action 'Send_an_HTTP_r...
Power Automate
Unanswered

Action 'Send_an_HTTP_request_to_SharePoint' failed (Status code:400 -Error Details: Unexpected response from the service)

(0) ShareShare
ReportReport
Posted on by 40

Background

  • The original flow is created to change the file name according to a SQL lookup table in OneDrive and is working as it should. 
  • The files do exist in a SP library, and thus I will need to use "Send an HTTP request to SharePoint" to update the file name.
  • I used the same logic until Send_an_HTTP_request_to_SharePoint"

Send an HTTP request to SharePoint Setup (screenshot attached)

  • I checked the API on the URL by adding _api/lists/GetByTitle('ICC Immersion') in the browser and returning some XML values. 
  • I used a variable for the ID to avoid apply to each loop

Headers

content-type: application/json
 
X-HTTP-Method: PATCH
OData-MaxVersion: 4.0
OData-Version: 4.0
If-None-Match: null
return: representation
If-Match: *
 
 
Results-Output
Body
{
  "status": 400,
  "message": "Unexpected response from the service\r\nclientRequestId: 768f8bf3-6b8f-4cfb-a873-51a342d2b5d4\r\nserviceRequestId: eee08ba0-7072-3000-08ed-8872c4507831",
  "error": {
    "message": "Unexpected response from the service"
  },
  "source": "sharepointonline-wus.azconn-wus.p.azurewebsites.net"
}
Headers
{
  "Pragma": "no-cache",
  "Cache-Control": "no-store, no-cache",
  "Set-Cookie": "ARRAffinity=277305230731c420c53b2cf0ffa2c39168f1f53c56848d990;Path=/;HttpOnly;Secure;Domain=sharepointonline-wus.azconn-wus.p.azurewebsites.net,ARRAffinitySameSite=277305230731c420c53b2cf0fa2c39168f1f53c56848d990;Path=/;HttpOnly;SameSite=None;Secure;Domain=sharepointonline-wus.azconn-wus.p.azurewebsites.net",
  "x-ms-request-id": "eee08ba0-7072-3000-08ed-8872c4507831",
  "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
  "X-Content-Type-Options": "nosniff",
  "X-Frame-Options": "DENY",
  "Timing-Allow-Origin": "*",
  "x-ms-apihub-cached-response": "true",
  "x-ms-apihub-obo": "false",
  "Date": "Fri, 13 Jan 2023 16:06:36 GMT",
  "Content-Length": "333",
  "Content-Type": "application/json",
  "Expires": "-1"
}
Status Code 400
 
This solution is based on the youtube video https://youtu.be/-Z1_43SWboM . Thank you!
Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Are you able to share the screenshot of your Send Http request to Sharepoint action?

  • jad_well Profile Picture
    40 on at

    jad_well_1-1673965026049.png

     

     

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    You seem to be missing the metadata attributes.

    SudeepGhatakNZ_1-1673986980845.png

     

  • Verified answer
    jad_well Profile Picture
    40 on at

    It worked, thanks. Please note that I got it to work using the following setup as well

    jad_well_1-1674137935892.png

     

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard