With the latest version of SSMS, SSMS 21, there is now integration with Copilot.

In this blog post, we’ll go through the setup step by step, with screenshots, to get everything ready to use Copilot in SSMS.
There is already some official documentation on this, but I believe many people will find it clearer to see everything illustrated.

Copilot is not free: you need an Azure subscription which pays according to the number and complexity of prompts.

I will use the API Key but you can also use Microsoft Entra to authenticate to Azure OpenAI for Copilot in SSMS which is probably safer.

Azure OpenAI Service

To start with, we’ll use the Azure OpenAI service.

Click “Create Azure OpenAI”

Create a Resource group if needed and choose a name.

Leave the “All networks” option selected on the Network pane.

AI Model deployment

Now, In the newly created resource click on “Go to Azure AI Foundry Portal”.

Then, on the left panel choose “Deployments” and click “Deploy model” and select “Deploy base model”.

Select “gpt-4o” and Confirm. It’s the only supported model for now.

Then click on “Customize”.

Here you can modify the name and select a Deployment type.
Here, I recommend reading the documentation to choose the option that best fits your needs.
Doc: Deployment types for Azure AI Foundry Models

SSMS

Now go to SSMS and click “Copilot”.

The Azure OpenAI Endpoint and the API Key can be found on the Azure OpenAI Service page, by clicking on “Click here to view endpoints”.

Finally the Open AI Deployment is the name we defined earlier. “ai-snrel-ssms-deployment” for me.

Note that the configuration can be edited under “Tools”, “Options”, “Copilot”.

We are done. I can now start chatting with the AI.

Hopefully, this blog made it easier for you to set up and start using Copilot in SSMS.

Regarding privacy it is written here that no prompts will be used by OpenAI to improve or train models so it should be quite safe.