web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Cross Environment Data...
Copilot Studio
Suggested Answer

Cross Environment Dataverse MCP - OBO Auth Flow Issue

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
Hi,

I am trying to set up a Copilot Studio Agent in Power Platform environment A that is supposed to connect to a Dataverse instance in Power Platform environment B, within the same tenant.

My understanding is that I cannot use the Microsoft Dataverse MCP Server, as this would require both the agent and Dataverse to be hosted in the same environment. For this reason, I decided to create a custom Model Context Protocol (MCP) server, providing the appropriate endpoint and using manual OAuth 2.0 authentication.

To do this, I created an Entra ID application with the required Dynamics CRM → user impersonation permissions and added it to the allowed client list of the target Dataverse MCP.

My goal is not only to connect to Dataverse, but also to ensure that each user connects using their own credentials, so that Dataverse permissions are enforced on a per-user basis.

As the owner, I was able to successfully query the Dataverse instance and retrieve data on my behalf. However, another user from the same tenant was not able to do so. That user is prompted with an authentication error, and when opening Connection Manager, the connection creation fails.




The only way we managed to make this user work was by letting them use my existing connection, which, however, causes all operations to be executed with my permissions. The connection has already been shared with this user with the “Use” role (we also tried Edit and that only allowed him to use my own connection).

Could you please help me understand whether connecting to Dataverse via MCP from environment A to environment B is supported using OBO auth flow, and what configuration or approach I should try in order to allow per-user authentication and authorization?

Thanks in advance.
I have the same question (0)
  • Suggested answer
    Sayali Profile Picture
    Microsoft Employee on at
    Hello,

    Cross-environment Dataverse access from a Copilot Studio agent via MCP is supported, but true per-user enforcement using OAuth On-Behalf-Of (OBO) is not currently supported. Although the architecture you implemented is technically correct, Copilot Studio does not forward the invoking user’s token to external MCP servers, so OBO never occurs. Instead, connections fall back to interactive user authentication, which can fail unless users exist and are licensed in the target Dataverse environment. Sharing a connection works because all calls execute under a single principal, but this removes per-user RBAC.

    Currently, the recommended approach for cross-environment scenarios is to use app-only access with managed identity and enforce RBAC manually in the MCP layer, or place the agent and Dataverse in the same environment to enable true per-user enforcement.

    Reference Document-
    Connecting Copilot Studio to a Dataverse MCP Endpoint Across Environments: A Practical Guide | The Custom Engine

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 601

#2
chiaraalina Profile Picture

chiaraalina 137 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 133

Last 30 days Overall leaderboard