maui-aspire

Configure MAUI HttpClient with MSAL.NET authentication for Aspire-hosted backend services.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/snailb1007/snail-codex-skills --skill maui-aspire-snailb1007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-aspire
Source: https://github.com/snailb1007/snail-codex-skills/tree/main/skills/maui-aspire
Command: npx skills add https://github.com/snailb1007/snail-codex-skills --skill maui-aspire-snailb1007

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

MAUI apps need to securely connect to Aspire-hosted APIs without the AppHost orchestrating the client, handling device networking, and authentication requirements.

Core Features & Use Cases

  • Secure MAUI calls to Aspire endpoints
  • Support for MSAL.NET authentication flow and real endpoints across platforms
  • Guidance for Android emulator networking, iOS/macOS, and Windows environments via Aspire dashboard

Quick Start

Run the Aspire AppHost to expose the API and configure the MAUI HttpClient to target the hosted endpoint.

Frequently Asked Questions about maui-aspire

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a MAUI app to Aspire backend services?

To connect a MAUI app to Aspire backend services, configure the MAUI HttpClient to target real hosted endpoints exposed by the Aspire AppHost while wiring a token handler to attach Bearer tokens.

How does MSAL.NET authentication work with MAUI and Aspire?

MSAL.NET authentication for MAUI and Aspire secures API calls by acquiring tokens across Android, iOS, macOS, and Windows workflows, attaching Bearer tokens via an HttpClient token handler to access Aspire endpoints.

Can I use Aspire service discovery URIs in my MAUI client?

You cannot use Aspire service discovery URIs in a MAUI client because the AppHost does not orchestrate the client, so you must configure HttpClient with real endpoints exposed by the Aspire dashboard.

What is the best way to handle MAUI networking constraints with Aspire?

Handling MAUI networking constraints with Aspire requires targeting real endpoints instead of Aspire URIs, addressing Android emulator networking specifics, and configuring HttpClient securely for iOS, macOS, and Windows.

Do I need to configure HttpClient differently for Aspire-hosted APIs on mobile?

You need to configure HttpClient for Aspire-hosted APIs on mobile by wiring it with a MSAL.NET token handler that attaches Bearer tokens, ensuring secure access to real endpoints across Android and iOS platforms.