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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / HTTP Request failed wh...
Copilot Studio
Unanswered

HTTP Request failed when call Azure OpenAI Service REST API

(0) ShareShare
ReportReport
Posted on by 69

Hello everyone,

I’m trying to make an HTTP Node call in Copilot Studio and follow the structure outlined in this example. My current JSON body works fine in Power Automate Cloud Flow, but when I try to use the HTTP Node in Copilot Studio same payload is not working

 

Here’s the JSON structure that works in Power Automate using POST with POST https://<endpoint>.openai.azure.com/openai/deployments/<deploymentName>/extensions/chat/completions?api-version=2023-06-01-preview

{
  "messages": [
    {
      "role": "system",
      "content": "You are an AI assistant that helps people find information."
    },
    {
      "role": "user",
      "content": "@{triggerBody()?['text']}"
    }
  ],
  "temperature": 0,
  "top_p": 1,
  "frequency_penalty": 0,
  "presence_penalty": 0,
  "max_tokens": 800,
  "stop": null,
  "dataSources": [
    {
      "type": "AzureCognitiveSearch",
      "parameters": {
        "endpoint": "https://xxx.search.windows.net",
        "key": "xxxx",
        "indexName": "xxxx"
      }
    }
  ]
}
I'm trying to follow the syntax in Copilot Studio to use it in a HTTP node but same syntax and is returning "Error Message: HTTP request failed with status code 400 BadRequest. Error Code: HttpRequestFailure"
https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#example-3
 
{
  messages: [
    {
      role: "system",
      content: "You are an AI assistant that helps people find information."
    },
    {
      role: "user",
      content: Topic.UserInput
    }
  ],
  temperature: 0,
  top_p: 1,
  frequency_penalty: 0,
  presence_penalty: 0,
  max_tokens: 800,
  stop: "null",
  dataSources: [
    {
      type: "AzureCognitiveSearch",
      parameters: {
        endpoint: "xxxx",
        key: "xxx",
        indexName: "xxx"
      }
    }
  ]
}


Any idea about how build this JSON in a HTTP Node in Copilot Studio?
errorConv.png
Categories:
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 594

#2
chiaraalina Profile Picture

chiaraalina 170 Super User 2026 Season 1

#3
deepakmehta13a Profile Picture

deepakmehta13a 118

Last 30 days Overall leaderboard