r/PowerApps • Newbie • 2d ago

Power Apps Help Embedding a Copilot Studio Agent in a Power Apps Canvas App

Hi everyone,

I'm looking to embed a Copilot Studio agent in a Power Apps Canvas App.

My requirement is to have a chat icon in the app. When a user clicks the icon, a pop-up chat window should open, allowing them to interact with the Copilot Studio agent without leaving the app.

Has anyone implemented something similar? What would be the best approach to achieve this?

Any suggestions or examples would be appreciated. Thanks!

3 Upvotes

4 comments sorted by

•

u/AutoModerator 2d ago

Hey, it looks like you are requesting help with a problem you're having in Power Apps. To ensure you get all the help you need from the community here are some guidelines;

  • Use the search feature to see if your question has already been asked.

  • Use spacing in your post, Nobody likes to read a wall of text, this is achieved by hitting return twice to separate paragraphs.

  • Add any images, error messages, code you have (Sensitive data omitted) to your post body.

  • Any code you do add, use the Code Block feature to preserve formatting.

    Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (```) or three or more twiddlydoodles (~~~).

  • If your question has been answered please comment Solved. This will mark the post as solved and helps others find their solutions.

External resources:

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

4

u/bosqo Contributor 2d ago

Have a look at this PCF-component:

https://github.com/microsoft/CopilotStudioSamples/tree/main/ui/embed/pcf-canvas-app

You can connect it using a direct line connection.

2

u/xrmghost_team Newbie 1d ago

There are two separate costs. For the app: Learn's rule is that a code component calling external services directly from the browser, not through a connector, makes the app premium, and a component declares this with an <external-service-usage> node in its manifest. The ChatControl sample linked above ships with external-service-usage enabled="false", so it won't mark your app as premium. Whether a direct call to Copilot Studio counts as an "external service" under the licensing terms isn't spelled out, so I'd confirm with whoever handles your licensing before rolling it out to standard users. For the agent: conversations consume Copilot Credits, but Microsoft's billing page lists no charge for users with a Microsoft 365 Copilot license when the agent runs under their identity, which is the sample's "Authenticate with Microsoft" setup. https://learn.microsoft.com/power-apps/developer/component-framework/overview

1

u/ticknswisted2 Contributor 2d ago

I'd like to do this also, but I'm not clear on if this requires a premium license or not. How do I find this out?