Home Power PlatformsCopilot and AI Running Your Custom Agent Inside Dynamics 365

Running Your Custom Agent Inside Dynamics 365

by Mo Faheem
Running Your Custom Agent Inside Dynamics 365

⚙️ Lab note (added September 2026): every agent in this series was built and run in the new Copilot Studio experience. What Microsoft now calls the GitHub Copilot harness (GA August 2026). The classic “standard harness” is a different build experience with different behaviour. My standard-harness rebuild and full harness comparison are scheduled on this blog for late October 2026.

An agent that lives only in a maker portal is a science project. Users do not work in Copilot Studio. They work in Dynamics 365, in Teams, in Outlook. This final build post of the series takes the Blog Lab Agent across that last mile: publishing it to a channel, surfacing it inside a model-driven app on the same environment, and closing the loop by asking the in-app Copilot about the very records the agent itself created in the Dataverse post.

Step 1. Publish to the Teams + Microsoft 365 Channel

In the agent editor, click Publish. The dialog asks for at least one channel. Add channel offered me Teams + Microsoft 365, a demo website, and an app channel. I chose Teams + Microsoft 365 with availability set to Microsoft 365 Copilot and Microsoft Teams.

⚠️ Important: the availability choice cannot be changed after publishing, the dialog says so in small print that deserves large print. Decide the surfaces before you click. Publishing to the M365 channel also took several minutes. That is normal, not a hang.

The publish success dialog confirming the agent is available on the Teams + Microsoft 365 channel
Your agent published successfully. From this moment it exists outside the lab, reachable in Teams and Microsoft 365 Copilot, governed by tenant policy.

Step 2. Meet Your Agent in the App Designer

Now for the Dynamics side. I built a simple model-driven app on the same environment (Accounts table, view-and-form template, five minutes in the Power Apps designer, and not the interesting part). The interesting part is the designer’s Agents pane: it lists AI experiences available to the app, and under In your environment, there was my published Blog Lab Agent, waiting.

The model-driven app designer Agents pane listing the published Blog Lab Agent under In your environment
App designer › Agents pane. Published agents in the environment appear here automatically, M365 Copilot up top, your custom agents below.

From the agent’s … menu, Add to feed places it in the app’s Agent feed, a sitemap area where agents surface tasks for users to supervise. One honest caveat appeared immediately:

The notice that the agent was added to Agent Feed but needs connections before it can generate tasks
Setup is required before this agent can surface tasks. Feed membership is instant. Task generation needs additional connections. For a chat-first lab, you can park this.

Save and publish the app, and one more nuance for your notes: the app assistant agent (preview) you may have read about creates its own dedicated side-pane agent per app. It does not host an existing one, and it excludes first-party apps like Sales Hub. The Agent feed route above is how a custom agent you already built gets into a custom app today.

Step 3. Play the App and Close the Loop

I hit Play, and the Blog Lab App opened on the environment with the SANDBOX banner, the Agent feed in the sitemap, and in the account list, the three records my agent had created through Dataverse MCP earlier in this series. Then the closing move: I opened the in-app Copilot pane and asked, “How many accounts are there?”

The Dynamics 365 in-app Copilot pane answering: there are 3 accounts in the Account table
“There are 3 accounts in the Account table.” Built in Copilot Studio, written through MCP, answered inside Dynamics 365. The circle closes.
The published model-driven app on mo-test with the agent-created account record, Agent feed pane and in-app Copilot chat
The full picture, live. An agent-created record, the Agent feed, and the Copilot pane, three AI surfaces in one running app, all on trial licenses.

End to end, that is: an agent designed in Copilot Studio, acting on Dataverse through MCP, published through a channel, and standing next to the users inside a running Dynamics 365 app, where the in-app Copilot happily reports on the data the agent wrote. Nothing in this chain required a line of code.

What I Learned

Publishing is where an agent stops being yours and starts being the organization’s: channels decide who can reach it, the environment decides what it can touch, and the app decides where users meet it. Get those three decisions right and the technology part is almost anticlimactic. My longest wait in this entire step was the publish spinner. An agent nobody can reach is a hobby. A channel is what makes it a colleague.

One post left in this series: the governance story. What all those Allow/Deny cards, connection identities, and credit meters add up to for a real rollout.

Related Articles

Leave a Comment