# Build a Secure C# MCP App with Cross App Access (XAA)

DevFeed: [Build a Secure C# MCP App with Cross App Access (XAA)](<https://devfeed.tech/articles/build-a-secure-c-mcp-app-with-cross-app-access-xaa-15971.md>)

Original publisher: [Read original article](<https://developer.okta.com/blog/2026/07/16/csharp-mcp-cross-app-access>)

Author: Aasawari Sahasrabuddhe

Published: 2026-07-16T05:00:00Z

Content type: tutorial

Language: en

Sources: [Okta Developer](<https://devfeed.tech/sources/okta-developer.md>)

Topics: [cross-app-access](<https://devfeed.tech/topics/cross-app-access.md>), [Model Context Protocol](<https://devfeed.tech/topics/model-context-protocol.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [Single sign-on (SSO)](<https://devfeed.tech/topics/sso.md>), [OpenID connect (OIDC)](<https://devfeed.tech/topics/oidc.md>), [MSP MCP](<https://devfeed.tech/topics/msp-mcp.md>), [AI Bots](<https://devfeed.tech/topics/ai-bots.md>), [Tool](<https://devfeed.tech/topics/tool.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [api](<https://devfeed.tech/tags/api.md>), [app](<https://devfeed.tech/tags/app.md>), [application](<https://devfeed.tech/tags/application.md>), [applications](<https://devfeed.tech/tags/applications.md>), [bearer](<https://devfeed.tech/tags/bearer.md>), [bearer-token](<https://devfeed.tech/tags/bearer-token.md>), [build](<https://devfeed.tech/tags/build.md>), [building](<https://devfeed.tech/tags/building.md>), [but](<https://devfeed.tech/tags/but.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [client](<https://devfeed.tech/tags/client.md>), [cross](<https://devfeed.tech/tags/cross.md>), [cross-app-access](<https://devfeed.tech/tags/cross-app-access.md>), [csharp](<https://devfeed.tech/tags/csharp.md>), [mcp](<https://devfeed.tech/tags/mcp.md>), [oauth](<https://devfeed.tech/tags/oauth.md>), [oidc](<https://devfeed.tech/tags/oidc.md>), [with](<https://devfeed.tech/tags/with.md>), [xaa](<https://devfeed.tech/tags/xaa.md>)

## AI overview

Cross App Access (XAA) lets an AI agent carry a user's identity to downstream services under enterprise policy without another login. The described flow uses RFC 8693 for the app to exchange an OIDC ID token with the enterprise Identity Provider for a JWT Authorization Grant (JAG), then RFC 7523 for presenting that JAG to the MCP authorization server to obtain a scoped access token. The article excerpt says it will implement the flow with a C# MCP SDK and test it using an XAA playground, but does not include those implementation steps.

## Source excerpt

A few years ago, getting a user signed in to an application or multiple applications with Single Sign-On (SSO) was enough; OpenID Connect (OIDC) handled the login, JWTs carried the claims, and Proof Key for Code Exchange (PKCE) made it secure. Today, with evolving AI, agents act on behalf of users and seek multiple accesses across different resources to execute a task. And that is when you'll hit the gap. The user has an identity, but the downstream service--like a Model Context Protocol (MCP) server, an API, or an agent tool has no way to trust it: the ID Token that proves the user's identity for your app, not for that service. You need a way to take that identity and have it trusted further down the chain, in line with the org's policy, without asking the user to log in again. Cross App Access (XAA) solves exactly that. The user authenticates once. The Identity Provider (IdP) evaluates the enterprise policy and issues a signed Identity Assertion. The downstream service exchanges that assertion for a scoped Bearer token. In this post, we'll explore how Cross App Access (XAA) closes the trust gap, test the flow using an XAA playground, and implement a secure MCP client in just a few lines of C# using our dedicated SDK. Table of Contents What is Cross App Access (XAA)? Implementing XAA with the C# MCP SDK Building the OIDC flow Automate XAA token exchange with C# SDK Connect the MCP client to the server Testing your C# MCP app with xaa.dev Run your C# MCP app with xaa.dev Learn More About Secure AI Agent Development with C# and MCP What is Cross App Access (XAA)? Before we start implementing and building the application, it is important to understand the mechanics of Cross App Access (XAA). At its core, XAA is an open standard that securely enables AI agents to act on behalf of a user and communicate with downstream applications without requiring constant, manual user consent. While the flow is sophisticated, it relies on two standard interactions: RFC 8693 (Token Exc