Hi Olaf,
Model-Driven Apps can’t silently create the Copilot Agent token, and MSAL on the client will always trigger a login popup. Copilot also doesn’t accept service tokens, so direct calls from the app aren’t supported.
The workable approach is to route everything through a backend API. Your Model-Driven App calls your Azure Function/.NET API (via Custom Connector or PCF), the Dataverse user token is sent automatically, and your backend uses the On-Behalf-Of (OBO) flow to exchange that token for a Copilot Agent token. The backend then calls the Copilot Agent and returns the response to the app.
This is the only clean and supported pattern to make the integration work.
Reference Docs:
- OBO flow: Microsoft identity platform and OAuth 2.0 On-Behalf-Of flow
- Custom connectors: https://learn.microsoft.com/en-us/connectors/overview
- Copilot Agent API: https://learn.microsoft.com/en-us/microsoft-copilot-studio/agent-extend-action-rest-api
Thank you.
Karan Shewale.
If this response resolves your issue, please Accept the answer and, if helpful, click the “Upvote” button. Your feedback helps us improve and assist others more effectively.