---
title: "Build a Secure C# MCP App with Cross App Access (XAA)"
description: "Cross App Access (XAA) lets an AI agent reuse a user's SSO identity to reach downstream MCP servers without another login."
url: "https://swe.quest/articles/build-a-secure-c-mcp-app-with-cross-app-access-xaa-92ac1c8e98ba2c76"
canonical: "https://developer.okta.com/blog/2026/07/16/csharp-mcp-cross-app-access/"
source: "Okta Developer"
published: "2026-07-16"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["identity-auth","dotnet","ai-agents"]
---

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

A post on [Okta Developer](https://swe.quest/sources/okta-developer.md), published 2026-07-16, 7 min read, How-to. Original: [https://developer.okta.com/blog/2026/07/16/csharp-mcp-cross-app-access/](https://developer.okta.com/blog/2026/07/16/csharp-mcp-cross-app-access/)

## Summary

Cross App Access (XAA) lets an AI agent reuse a user's SSO identity to reach downstream MCP servers without another login. The app exchanges the OIDC ID token for an ID-JAG at the IdP via RFC 8693 token exchange, then trades that ID-JAG for a scoped access token via the RFC 7523 JWT bearer grant. In C#, ASP.NET Core's OIDC middleware with PKCE handles sign-in, the MCP C# SDK's IdentityAssertionGrantProvider wraps both token hops, and HttpClientTransport with a Bearer header connects McpClient to the server. The walkthrough registers a requester app on the xaa.dev playground and reads a to-do resource from its sample MCP server.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [.NET](https://swe.quest/tags/dotnet.md) (Languages)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)

## Prerequisites

- OAuth 2.0 and OpenID Connect ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))
- ASP.NET Core
- JWT basics

## Keywords

Cross App Access, Model Context Protocol, MCP C# SDK, RFC 8693, RFC 7523, ID-JAG, xaa.dev, ASP.NET Core

## Related posts

- [Build a Secure TypeScript MCP Client with Cross App Access (XAA)](https://swe.quest/articles/build-a-secure-typescript-mcp-client-with-cross-app-access-xaa-192e23b51ee31d20.md): Okta Developer · 2026-10-09 · Medium · 20 min read · Identity & auth, AI agents, TypeScript
  Cross App Access (XAA) lets an enterprise IdP vouch for a signed-in user across app boundaries, replacing per-app OAuth consent screens and shared service accounts with admin-set policy.
- [Implement Secure Cross App Access (XAA) in Go](https://swe.quest/articles/implement-secure-cross-app-access-xaa-in-go-0a6938474ca2d783.md): Okta Developer · 2026-11-23 · Medium · 15 min read · Identity & auth, Go, AI agents
  Cross App Access (XAA) lets an app or AI agent reach another app's API on a signed-in user's behalf without a second sign-in or consent screen.
- [Add Cross App Access to Your OIDC Resource Application](https://swe.quest/articles/add-cross-app-access-to-your-oidc-resource-application-d8b2c307a8d6f7b5.md): Okta Developer · 2026-08-24 · Medium · 14 min read · Identity & auth, AI agents, Security
  Cross App Access (XAA) lets an OIDC-federated resource server accept API calls from agents by redeeming an Identity Assertion Authorization Grant (ID-JAG), a short-lived JWT issued by the customer's IdP, for a locally issued access token.
- [Add Cross App Access to Your OIDC Requesting Application](https://swe.quest/articles/add-cross-app-access-to-your-oidc-requesting-application-7e10341c7eb0e499.md): Okta Developer · 2026-08-21 · Medium · 10 min read · Identity & auth, AI agents
  Cross App Access (XAA) lets an OIDC-federated app reach third-party APIs by exchanging the refresh token from sign-in for an Identity Assertion Authorization Grant (ID-JAG) at the IdP via RFC 8693 token exchange, then redeeming that short-lived JWT for an access token at the resource app's authorization server via the RFC 7523 jwt-bearer grant.
- [Build "Sign in with Your App" using Supabase Auth](https://swe.quest/articles/build-sign-in-with-your-app-using-supabase-auth-a42222eedce43362.md): Supabase · 2025-12-04 · Medium · 6 min read · Identity & auth, AI agents, PostgreSQL
  Supabase Auth can now act as an OAuth 2.1 and OpenID Connect identity provider, letting a project offer "Sign in with \[Your App\]" to third-party apps, MCP-based AI agents, partner integrations and enterprise SSO.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
