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:

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Copilot Studio

#1
Mohsin Ali Profile Picture

Mohsin Ali 129

#2
11manish Profile Picture

11manish 127 Super User 2026 Season 2

#3
anirudhev Profile Picture

anirudhev 63

Last 30 days Overall leaderboard