Connect to Azure OpenAI from Excel and Word
GPT for Excel and GPT for Word can connect to Azure AI to use OpenAI models. In Azure AI, each model has a dedicated API endpoint that you use to access the model.
Prerequisites
You have an Azure subscription with Azure AI service access.
You have deployed a model in an Azure OpenAI resource.
To use an Azure OpenAI model:
Get the Azure OpenAI endpoint details
To connect to Azure AI from GPT for Excel and Word, you need the endpoint URL, name, and API key for the Azure OpenAI model you want to use.
-
Sign in to Azure AI Foundry.
-
Select the Azure OpenAI resource that has the model you want to use.
-
In the sidebar, select My assets > Models + endpoints.

-
In Model deployments, in the models list, click the name of the model you want to use.

-
In the model details, copy the Target URI, Key, and Model name.

Set up the Azure OpenAI endpoint
-
Sign in to the GPT for Work dashboard with your Microsoft account.
-
In the sidebar, select API endpoints.
-
Click Azure OpenAI endpoints.
tipIf you already have Azure OpenAI endpoints set up, click Add another Azure OpenAI endpoint.
-
Define the endpoint settings:
-
Endpoint URL: Enter the endpoint URL for the model.
-
Model name: Enter the model name.
-
API key: Enter the API key for accessing the endpoint.
-
Display name (optional): Enter a custom display name for the model. If not set, the model switcher uses Model name as the display name.

-
-
Click Check to validate the settings and click Save.

You have set up the Azure OpenAI endpoint. You can now use the endpoint model in GPT for Excel and Word.
To set up another Azure OpenAI endpoint with a different model, click Add another Azure OpenAI endpoint and repeat steps 4 and 5.

Select the Azure OpenAI model
MS Excel
MS Word
Open a Microsoft Excel workbook.
In the Home tab, click GPT for Excel Word.
infoYou can also select Home > Add-ins > My Add-ins > GPT for Excel Word.
In the sidebar menu, select Bulk AI tools or GPT functions.
Expand the model switcher. You can find the Azure OpenAI model under Use your API key or endpoint.

Select the model.
GPT for Excel now uses the selected model to generate responses for bulk AI tools and GPT functions.
Open a Microsoft Word document.
In the Home tab, click GPT for Excel Word.
infoYou can also select Home > Add-ins > My Add-ins > GPT for Excel Word.
Expand the model switcher. You can find the Azure OpenAI model under Use your API key or endpoint.

Select the model.
GPT for Word now uses the selected model to generate responses.