# "Incorrect API key provided" Error when working with Azure OpenAI

**URL:** https://forum.weaviate.io/t/incorrect-api-key-provided-error-when-working-with-azure-openai/806
**Category:** Support
**Created:** [October 10, 2023, 6:18pm UTC](https://forum.weaviate.io/t/incorrect-api-key-provided-error-when-working-with-azure-openai/806 "2023-10-10T18:18:17Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![c-lara](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/c-lara/32/560_2.png) [@c-lara](https://forum.weaviate.io/u/c-lara)
#### Post date: [December 2, 2023, 11:28am UTC](https://forum.weaviate.io/t/incorrect-api-key-provided-error-when-working-with-azure-openai/806/5 "2023-12-02T11:28:03Z")

</div>

Hi both,

Fortunately, I found the solution!

You need to insert the baseURL in your schema definition like so:

```auto
                "moduleConfig": {
                    "text2vec-openai": {
                        "baseURL": "https://YOUR_RESSOURCE_NAME.openai.azure.com/",
                        "resourceName": "YOUR_RESSOURCE_NAME",
                        "deploymentId": "text-embedding-ada-002",
                    }
                },

```

Then it correctly recognizes it as Azure. I think it would be useful for others to update this in the Weaviate Documentation, as this is really not mentioned anywhere.

Good luck!

---

_[View the full topic](https://forum.weaviate.io/t/incorrect-api-key-provided-error-when-working-with-azure-openai/806)._
