# Struggling with Azure OpenAI setting

**URL:** <https://forum.cursor.com/t/struggling-with-azure-openai-setting/810>\
**Category:** Help\
**Created:** [September 30, 2023, 3:41pm UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810 "2023-09-30T15:41:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpthoma7](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jpthoma7/32/342_2.png) [@jpthoma7](https://forum.cursor.com/u/jpthoma7)\
**Post date:** [September 30, 2023, 3:41pm UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/1 "2023-09-30T15:41:52Z")

</div>

I am struggling with BYOK with Azure Open AI. Seems to validate but nothing happens in the AI chat.

![whereareyoucursorai](https://us1.discourse-cdn.com/cursor1/original/1X/9f5d780db6433611f61fc9f98cfa57e6d16f325b.gif)

---

<div class="post-metadata">

**Author:** ![jpthoma7](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jpthoma7/32/342_2.png) [@jpthoma7](https://forum.cursor.com/u/jpthoma7)\
**Post date:** [September 30, 2023, 3:42pm UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/2 "2023-09-30T15:42:34Z")

</div>

The settings switch is green and validates.  
 ![cursorazureopenai](https://us1.discourse-cdn.com/cursor1/original/1X/cad2cffdc24fe4b42bab202d58ccf785930ab976.png)

---

<div class="post-metadata">

**Author:** ![arvid220u](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/arvid220u/32/82089_2.png) [@arvid220u](https://forum.cursor.com/u/arvid220u)\
**Post date:** [October 1, 2023, 1:26am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/3 "2023-10-01T01:26:01Z")

</div>

This seems like a bug! Thank you for reporting. Version 0.12.0, coming today or tomorrow, should improve the error messages here and make it easier to debug.

---

<div class="post-metadata">

**Author:** ![dan](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dan](https://forum.cursor.com/u/dan)\
**Post date:** [October 3, 2023, 2:41pm UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/4 "2023-10-03T14:41:51Z")

</div>

I’m surprised the UI doesn’t ask for information about deployment / engine names. Azure OpenAI resources can and often do have custom names for deployments “wrapping” individual models.

> **[Azure OpenAI Service REST API reference - Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference)**
>
> Learn how to use Azure OpenAI's REST API. In this article, you'll learn about authorization options, how to structure a request and receive a response.

---

<div class="post-metadata">

**Author:** ![wey](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/wey/32/76_2.png) [@wey](https://forum.cursor.com/u/wey)\
**Post date:** [October 10, 2023, 6:34am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/5 "2023-10-10T06:34:00Z")

</div>

It used to work like a charm, today suddenly oai gpt doesnt work and in setting there is no endpoint but only KEY to be configured, does cursor drop the support for OAI?

---

<div class="post-metadata">

**Author:** ![truell20](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/truell20/32/28583_2.png) [@truell20](https://forum.cursor.com/u/truell20)\
**Post date:** [October 10, 2023, 11:43am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/6 "2023-10-10T11:43:48Z")

</div>

@wey are you using a normal OpenAI key? What error are you seeing? Can you screenshot?

---

<div class="post-metadata">

**Author:** ![wey](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/wey/32/76_2.png) [@wey](https://forum.cursor.com/u/wey)\
**Post date:** [October 13, 2023, 4:20am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/7 "2023-10-13T04:20:52Z")

</div>

No, sorry I was using Azure OpenAI key for long time, as I recall I somehow configured that Key in cursor, but recently Azure OAI seemed to be removed, right?

If that’s on purpose, I’ll subscribe the pro tier then.

---

<div class="post-metadata">

**Author:** ![agi\_ceo](https://avatars.discourse-cdn.com/v4/letter/a/d26b3c/32.png) [@agi\_ceo](https://forum.cursor.com/u/agi_ceo)\
**Post date:** [January 17, 2024, 7:16pm UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/8 "2024-01-17T19:16:25Z")

</div>

what did yall do to fix this? I started getting this issue all of a sudden today and not sure why. I tested the key and it works, but for some reason azure oai on cursor keeps hitting me w errors

---

<div class="post-metadata">

**Author:** ![amanrs](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/amanrs/32/105_2.png) [@amanrs](https://forum.cursor.com/u/amanrs)\
**Post date:** [January 18, 2024, 5:26am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/9 "2024-01-18T05:26:22Z")

</div>

Apologies about this! We had some issues yesterday and today, but it should be back up now.

---

<div class="post-metadata">

**Author:** ![BenisonSam](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@BenisonSam](https://forum.cursor.com/u/BenisonSam)\
**Post date:** [September 13, 2024, 11:56am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/10 "2024-09-13T11:56:15Z")

</div>

I am new to Cursor. I configured my Azure OpenAI key.

 ![image](https://us1.discourse-cdn.com/cursor1/original/2X/9/9ab2a62bae1f30eaa284d3eec7f2c8425e64327f.png)

But it is giving me the following error:

```json
{
  "error": {
    "message": "Unrecognized request arguments supplied: metadata, system",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}

```

What am I doing wrong?

Additional details (Request Id): `f7ffdae1-f661-4e16-b8af-2ca3e36366b9`

---

<div class="post-metadata">

**Author:** ![pjpjq](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/pjpjq/32/5946_2.png) [@pjpjq](https://forum.cursor.com/u/pjpjq)\
**Post date:** [September 24, 2024, 9:55am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/11 "2024-09-24T09:55:07Z")

</div>

same, did you solve it/?

---

<div class="post-metadata">

**Author:** ![BenisonSam](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@BenisonSam](https://forum.cursor.com/u/BenisonSam)\
**Post date:** [October 7, 2024, 8:03am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/12 "2024-10-07T08:03:52Z")

</div>

No, its the same error still. No fixes and no replies from cursor either.

---

<div class="post-metadata">

**Author:** ![BenisonSam](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@BenisonSam](https://forum.cursor.com/u/BenisonSam)\
**Post date:** [October 7, 2024, 8:09am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/13 "2024-10-07T08:09:25Z")

</div>

@truell20 and @amanrs: This is still not working, it’s not an issue for a day or two. This has been like this for months now. Is nobody using the Azure OpenAI API key in Cursor? What @dan brings up also makes sense. Can you please give an update?

---

<div class="post-metadata">

**Author:** ![liang520](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/liang520/32/8928_2.png) [@liang520](https://forum.cursor.com/u/liang520)\
**Post date:** [October 18, 2024, 5:05am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/14 "2024-10-18T05:05:54Z")

</div>

yeah,i have the same issues:  
We encountered an issue when using your [phx-eastus-4o.openai.azure.com](http://phx-eastus-4o.openai.azure.com) API key. Please check your API key settings and try again. Error: Request failed with status code 400

API Error: {

“error”: {

“message”: “Unknown parameter: ‘metadata’.”,

“type”: “invalid\_request\_error”,

“param”: “metadata”,

“code”: “unknown\_parameter”

}

}

---

<div class="post-metadata">

**Author:** ![darrensapalo](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/darrensapalo/32/10702_2.png) [@darrensapalo](https://forum.cursor.com/u/darrensapalo)\
**Post date:** [November 4, 2024, 4:16am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/15 "2024-11-04T04:16:29Z")

</div>

Two (2) things to double check when it comes to using Azure OpenAI for your LLM usage in Cursor:

## 1. Ensure you are using the correct parameters

### Deployment name

Take note that “Deployment Name” is different from “Model Catalog”. This means that you might have your own Deployment called “MyCompany-OpenAI-o1-preview” which uses model “o1-preview”.

❌ You’re not supposed to use `o1-preview` which is the model name. You’re supposed to use `MyCompany-OpenAI-o1-preview`.

On Azure Studio, from the sidebar you can find “Shared resources” \> “Deployments” to find the deployment name. Don’t find deployment name under “model catalog”.

### Base URL

The Base URL should look like this:

```auto
https://<your gcp agents resource name>.openai.azure.com

```

No other trailing path. It’s just that.

### API Key

You can find the API key in `OpenAI Studio > Home > API Key` or `OpenAI Studio > Shared Resources > Deployments > API Key`.

## 2. Verify security restrictions on CIDR/IP

Make sure your GCP Agents Resource allows access from your machine’s IP address. This one you can find in GCP and not in Azure OpenAI Studio.

 ![image](https://us1.discourse-cdn.com/cursor1/original/2X/a/acf3766d3c9040ffc33701a955d630f1c2faa25e.png)

* * *

Afterwards, your Cursor should work correctly. Good luck!

---

<div class="post-metadata">

**Author:** ![billsanto](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/billsanto/32/16007_2.png) [@billsanto](https://forum.cursor.com/u/billsanto)\
**Post date:** [December 15, 2024, 3:02pm UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/16 "2024-12-15T15:02:23Z")

</div>

> [@darrensapalo](#):
>
> The Base URL should look like this:
> 
> ```auto
> https://<your gcp agents resource name>.openai.azure.com
> 
> ```
> 
> No other trailing path. It’s just that.

Has anyone gotten this to work with a non-Azure domain? Our institution uses our own domain name to access Azure, and since I can’t get the credentials validated in Cursor, it seems there is something in the source which assumes the base URL must contain [azure.com](http://azure.com).

---

<div class="post-metadata">

**Author:** ![DesertWalker](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/desertwalker/32/18093_2.png) [@DesertWalker](https://forum.cursor.com/u/DesertWalker)\
**Post date:** [January 1, 2025, 1:57pm UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/17 "2025-01-01T13:57:26Z")

</div>

I must ask: have you tried this on o1 specifically? Because when I paste the deployment name ‘please\_work’, it works if the model is gpt-4o it works, but if it’s ‘o1’ it doesn’t, although they belong to same base url.

---

<div class="post-metadata">

**Author:** ![ksquarekumar](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/ksquarekumar/32/9202_2.png) [@ksquarekumar](https://forum.cursor.com/u/ksquarekumar)\
**Post date:** [February 4, 2025, 10:42pm UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/18 "2025-02-04T22:42:46Z")

</div>

second, Azure OpenAI settings don’t work for o1 and o3-mini, works when it’s pointed to gpt-4o

---

<div class="post-metadata">

**Author:** ![danperks](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/danperks/32/19087_2.png) [@danperks](https://forum.cursor.com/u/danperks)\
**Post date:** [February 6, 2025, 10:00pm UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/19 "2025-02-06T22:00:41Z")

</div>

Hey, you are right they don’t work right now unfortunately! We are hoping to get this sorted soon.,

---

<div class="post-metadata">

**Author:** ![jasonhowie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/jasonhowie/32/22107_2.png) [@jasonhowie](https://forum.cursor.com/u/jasonhowie)\
**Post date:** [April 1, 2025, 3:37am UTC](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810/20 "2025-04-01T03:37:44Z")

</div>

Has this been fixed?

[Next page](https://forum.cursor.com/t/struggling-with-azure-openai-setting/810.md?page=2)
