Study FAQ
How does a custom application call a Copilot Studio agent with the Microsoft 365 Agents SDK?
Also asked as 2
- How do I connect a web or native app to a Copilot Studio agent with the Agents SDK?
- What does a signed-in app need to invoke a Copilot Studio agent through the Agents SDK?
Answer
For a signed-in web or native app, use the Copilot Studio client library in the Microsoft 365 Agents SDK with a Copilot Studio agent built using the standard harness. Microsoft provides .NET, JavaScript, and Python samples.
Register the app in Microsoft Entra ID in the agent's tenant for the documented interactive sign-in for your client type. Add the delegated Power Platform API permission CopilotStudio.Copilots.Invoke and complete the applicable consent. Public clients use their documented sign-in and redirect configuration without a client secret embedded in the app. Configure the target agent from its connection string or the supported environment, schema, and tenant settings. Keep the destination under application control.
Run the matching sample against a published test agent with an intended user. Verify a returned message for that user, then verify a denied or signed-out call surfaces an authentication or authorization failure.
Microsoft references
Full explanation
AB-400: Integrating Foundry and Copilot Studio Agents
Study guide · AB-400
Read the full explanation