Skip to main content

Notifications

Building Copilot Studio Chatbots in Microsoft T...
Unanswered

Issue with send HTTP Request from Microsoft Copilot Studio

Posted on by

 

Hi, I have developed a ChatBot using Copilot Studio and while trying to call a ODATA service using 'Send HTTP Request' in advanced options with Header and Body, I am getting 400 error. I provided all the required values in Header and Body and this service is working fine from Postman.

 

Did anyone make HTTP call for the service registered in Microsoft APIM from Microsoft Copilot Studio?

 

 

Error Message: HTTP request failed with status code 400 Bad Request. Error Code: HttpRequestFailure Conversation Id: 68a38f36-1c03-4964-83f3-aa0c388c1913.

 

I am looking for some pointers to resolve this error, appreciate if anyone share their thoughts for this.

  • nileshthonte Profile Picture
    nileshthonte 2 on at
    Re: Issue with send HTTP Request from Microsoft Copilot Studio

    Hi I am facing this issue after sending api post request here in the response body of api there is only this response 

    {
        "Message": "Ok"
    } but i am gettiing this error on studio copilot "Error Message: HTTP action with id ‘sIPbC6’ got an invalid response body back from the endpoint Error Code: HttpRequestInvalidResponseBody Conversation Id: c1f5487e-9826-468c-9abf-f183db5874ba Time (UTC): 2024-05-01T11:18:45.383Z" guide me to resolve this issue 
  • fhlim Profile Picture
    fhlim 9 on at
    Re: Issue with send HTTP Request from Microsoft Copilot Studio

    Hi @rkatakam, in my context i only maintained the authentication key in the header and not in the body. You may want to also check the string that is being sent to http request in Copilot Studio and cross check against Postman. This helped me get the call correctly formatted for Copilot Studio. All ze best!!

  • rkatakam Profile Picture
    rkatakam on at
    Re: Issue with send HTTP Request from Microsoft Copilot Studio

    Hi @fhlim, Thanks for your response. Yes, my APIM need authentication, and I have maintained them in Header and Body. So, do we need to maintain all of them only in Header? no need to maintain in Body?

  • fhlim Profile Picture
    fhlim 9 on at
    Re: Issue with send HTTP Request from Microsoft Copilot Studio

    hi, does your APIM require authentication? if so, you need to include the api key (or whatever authentication mechanism) in the header. Mine worked after that.

  • rkatakam Profile Picture
    rkatakam on at
    Re: Issue with send HTTP Request from Microsoft Copilot Studio

    Hi @Expiscornovus 

     

    Thanks for your reply. Yes, l could be able to call an ODATA service available from internet but when I tried to call an ODATA service of SAP from Copilot Studio ChatBot I am getting the above errors. I am not using Power Automate desktop/cloud flows as my requirement is to directly make a HTTP call from ChatBot itself.

  • Expiscornovus Profile Picture
    Expiscornovus 29,248 on at
    Re: Issue with send HTTP Request from Microsoft Copilot Studio

    Hi @rkatakam,

     

    Just to double check. I assume this OData service is available from the internet and not just from your local network? 

     

    Btw, are you calling this service from a call an action cloud flow? If that is not the case have tried that approach as a workaround?

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 137,998

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,059

Leaderboard

Featured topics