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 / 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?
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

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 > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 261 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 198 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard