web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : suwk8GV8dRnuCGABHgpbWZ
Power Automate - General Discussion
Answered

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

Like (0) ShareShare
ReportReport
Posted on 13 Jan 2023 16:30:30 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)
  • Verified answer
    jad_well Profile Picture
    40 on 19 Jan 2023 at 14:19:08
    Re: Action 'Send_an_HTTP_request_to_SharePoint' failed (Status code:400 -Error Details: Unexpected response from the service)

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

    jad_well_1-1674137935892.png

     

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,381 Most Valuable Professional on 17 Jan 2023 at 20:23:11
    Re: Action 'Send_an_HTTP_request_to_SharePoint' failed (Status code:400 -Error Details: Unexpected response from the service)

    You seem to be missing the metadata attributes.

    SudeepGhatakNZ_1-1673986980845.png

     

  • jad_well Profile Picture
    40 on 17 Jan 2023 at 14:14:01
    Re: Action 'Send_an_HTTP_request_to_SharePoint' failed (Status code:400 -Error Details: Unexpected response from the service)

    jad_well_1-1673965026049.png

     

     

  • SudeepGhatakNZ Profile Picture
    14,381 Most Valuable Professional on 15 Jan 2023 at 21:55:01
    Re: Action 'Send_an_HTTP_request_to_SharePoint' failed (Status code:400 -Error Details: Unexpected response from the service)

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 725 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 363 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 341

Last 30 days Overall leaderboard
Loading complete