maui-aspire

Configure MAUI client integration with Aspire backends using MSAL authentication.

Updated Nov 5, 2025
One-click install
npx skills add https://github.com/mkazimoto/AppMAUICopilot --skill maui-aspire
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-aspire
Source: https://github.com/mkazimoto/AppMAUICopilot/tree/main/.github/skills/maui-aspire
Command: npx skills add https://github.com/mkazimoto/AppMAUICopilot --skill maui-aspire

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MAUI apps often need to securely connect to Aspire-hosted backend services, but there is no built-in guidance for AppHost integration, service discovery, token-based authentication, and cross-platform networking. This Skill consolidates best practices for configuring AppHost, HttpClient DI, and Entra ID authentication in MAUI projects.

Core Features & Use Cases

  • Guidance on AppHost configuration and service discovery for Aspire-backed APIs.
  • HttpClient DI setup and token-based authentication using MSAL.NET.
  • Platform-specific networking considerations for Android emulators and iOS simulators, enabling local development and production deployment.

Quick Start

Set up AppHost integration, register the MAUI client, and verify token-based authentication flows for Aspire-connected backends.

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-hosted backend services?

To connect a MAUI app to Aspire-hosted backend services, configure the Aspire AppHost for service discovery and use HttpClient dependency injection to route requests securely to your backend APIs.

Can I use MSAL.NET for authentication in a MAUI app targeting Aspire backends?

Yes, you can use MSAL.NET for authentication in a MAUI app targeting Aspire backends. It enables secure token-based authentication flows using Entra ID for your cross-platform Android and iOS clients.

Should I add my MAUI project to the Aspire AppHost orchestration?

No, you should not add your MAUI project to the Aspire AppHost orchestration. The MAUI client operates independently and connects to Aspire services via service discovery and HttpClient configuration.

What are the networking considerations for MAUI apps connecting to Aspire during local development?

Networking considerations for MAUI apps connecting to Aspire include platform-specific setup for Android emulators and iOS simulators. Proper HttpClient DI and service discovery configuration are required to reach local Aspire service endpoints.

How do I set up HttpClient dependency injection for Aspire service discovery in MAUI?

Set up HttpClient dependency injection for Aspire in MAUI by registering the HttpClient in the DI container and configuring it to resolve Aspire service discovery endpoints, ensuring proper token-based authentication headers are attached.

Does this guidance cover deploying MAUI with Aspire backends to production?

Yes, this guidance covers deploying MAUI with Aspire backends to production. It outlines AppHost configuration, MSAL-based authentication, and cross-platform networking considerations that enable both local development and production deployment.