LowCodeStacks™
Sign in

Use a Foundry model in Copilot Studio prompts, and keep it governed

Connect a model you deployed in Microsoft Foundry to a prompt in Copilot Studio, avoid the endpoint and model-version traps, and govern it with data policies and Foundry's content filters.

Azure + Power PlatformFix a problem7 min read

Checked against Microsoft Learn 5 sources · Updated By · drafted with AI help, checked by a personHow we write guides

You can run a prompt in Copilot Studio on a model you deployed yourself in Microsoft Foundry instead of the managed models Copilot Studio offers. That lets you use a model from Foundry's catalog, such as a Llama or Phi model, or your own deployment of an OpenAI model, with your own content filters and quota. The same feature works in Power Apps and Power Automate prompts. Two details decide whether the connection works at all: the endpoint you paste and the model family you choose.

An agent in Copilot Studio uses models in two places. The primary model plans, chooses tools and answers; you pick it on the agent's Overview page, under Model, from Copilot Studio's own list. A prompt tool does one job, such as summarising a case, and runs on the model you choose for it: this is where your Foundry deployment plugs in, as a connection through the Azure AI Foundry connector. The deployment must be a chat completion model, and it brings your own content filters and quota. Two traps decide whether it connects: paste the chat completions endpoint, which ends in /chat/completions, not the Responses API endpoint ending in /openai/v1/responses, which gives Resource not found; and GPT-5, GPT-5 mini, GPT-5 nano and later GPT-5.x models aren't supported for prompts yet. Govern it by giving the Azure AI Foundry connector a place in your data policies, and by managing content filters on the deployment in Foundry.
Your Foundry model runs a prompt tool, while the agent's primary model still comes from Copilot Studio's own list.

Where a Foundry model fits

An agent in Copilot Studio uses models in two different places:

  • The agent's primary model decides how the agent plans, chooses tools and answers. You pick it on the agent's Overview page, under Model, from Copilot Studio's own list, which also offers some models from Anthropic, xAI and Mistral through a separate feature.
  • Prompt tools are reusable instructions the agent calls for one job, such as summarising a case or extracting fields from a document. This is where a Foundry model plugs in: each prompt runs on the model you choose for it.

So the pattern is a capable primary model for the conversation, and a prompt on your Foundry model for the task that needs it.

What the primary model card on the Overview page shows, as of September 2026:

  1. Select your agent's model: the model the agent uses for reasoning and responding, picked from Copilot Studio's own list. Your Foundry deployment plugs into prompts instead (below).
  2. preview terms: experimental models in the list come under preview terms, and Microsoft doesn't recommend them for production.
The Select your agent's model card on a Copilot Studio agent's Overview page. It reads: Your agent will primarily use the model for reasoning and responding. Experimental models are subject to preview terms, with preview terms and Learn more as links. Below is a drop-down list set to GPT-5.5 Chat.
Recreated by LowCodeStacks from Microsoft Learn screenshots (CC BY 4.0): the model card on a Copilot Studio agent's Overview page, interface as of September 2026.

These steps apply to agents built on Copilot Studio's standard harness.

Connect the model to a prompt

  1. In Foundry, deploy the model you want. It must be a chat completion model. Note the deployment's endpoint, its deployment name and its base model name, and have an API key for the Foundry resource it's deployed in.
  2. In Copilot Studio, open your agent's Tools page, select Add a tool, then the Prompt card under Create new, and give the prompt a name.
  3. Write the instructions under Instructions, or describe the task and let Copilot draft them.
  4. In the Model list next to the instructions, select the + to connect a model from Azure AI Foundry.
  5. On Connect a model from Azure AI Foundry, enter the Model deployment name and Base model name exactly as Foundry shows them, the Azure model endpoint URL and the API Key; all four are required. Model description is optional. Keep Test the connection with the model ticked to check the link, then select Connect.
  6. Choose your model in the Model list and save the prompt. Every run of this prompt now uses it.

What the Connect a model from Azure AI Foundry form shows, as of October 2025:

  1. Model deployment name and Base model name: both required, and both must match what Foundry shows for the deployment.
  2. Azure model endpoint URL and API Key: also required. The endpoint must be the chat completions one, ending in /chat/completions.
  3. Model description: optional.
  4. Test the connection with the model to validate the correct link to Foundry: ticked when the form opens. Connect is greyed out while the form is empty.
The Connect a model from Azure AI Foundry form in Copilot Studio, with a close button. An introduction says you need to configure the model deployment, choosing an existing connection or creating a new one, and specify the endpoint URL and the authentication details, such as the API key, followed by a Learn more link. Five empty fields follow, each with an information icon: Model deployment name, required; Base model name, required; Azure model endpoint URL, required; API Key, required; and Model description, marked optional in its placeholder. Below them a ticked checkbox reads Test the connection with the model to validate the correct link to Foundry. A reminder says that when you connect a model hosted in your own Azure AI Foundry subscription you are responsible for your own responsible AI mitigations in Foundry, such as a metaprompt, content filters or other safety systems, and that the connection could take some time once it is created. At the bottom, Connect is greyed out next to Close.
Recreated by LowCodeStacks from Microsoft Learn screenshots (CC BY 4.0): the Connect a model from Azure AI Foundry form in Copilot Studio, interface as of October 2025.

If the prompt takes an image or a document, the list shows only models that can read images, such as GPT-4o, GPT-4o mini, o1 and the Phi vision models.

The two traps

ProblemWhyFix
Resource not found when you select ConnectYou pasted the model's Responses API endpoint, which ends in /openai/v1/responsesUse the chat completions endpoint, which ends in /chat/completions, for example https://<resource>.services.ai.azure.com/openai/deployments/<deployment>/chat/completions
The model you want can't be connectedGPT-5, GPT-5 mini, GPT-5 nano and later GPT-5.x models aren't supported for prompts yetDeploy an earlier supported model for the prompt, or use one of Copilot Studio's managed models

Copilot Studio also can't generate images through this feature. To return an image from a Foundry image model, expose it as a REST API and call it from a custom action.

Govern it

  • Data policies. Each Foundry model a maker connects is a connection through a connector named Azure AI Foundry. In the Power Platform admin center, give that connector a place in your data policies: allow it with your business connectors where makers may bring models, or block it where they may not.
  • Connections. Every model a maker connected appears on the Connections page like any other connection. Review them there, and remove the ones nobody should use.
  • Responsible AI. Microsoft recommends managing content filters and other responsible AI settings for these models in Foundry, on the deployment itself.
  • Quota. Prompts call your deployment directly, so they use its rate limits. A busy agent can be throttled by your own deployment's limits, which you raise or spread in Foundry.
  • Experimental models. If you also change the agent's primary model, Copilot Studio's experimental and preview models aren't meant for production, and some process data outside your region.

Related: Which Microsoft agent tool to use.

Sources

Add LowCodeStacks as a preferred source on Google

Did this fix it?

Comments

No comments yet. Share what worked for you.

Sign in to comment. Comments show under a display name you choose, never your email.