What problem does it solve?
This guide helps mobile developers connect .NET MAUI applications to backend services hosted and orchestrated by .NET Aspire, resolving mismatches between AppHost service discovery and real device/simulator networking, and explaining how to authenticate MAUI clients using MSAL.NET public-client flows.
Core Features & Use Cases
- Networking Guidance: Shows how to use real, network-reachable endpoints instead of Aspire service-discovery URIs and explains platform-specific loopback addresses for Android, iOS, Mac Catalyst, and Windows.
- Authentication Pattern: Describes using MSAL.NET PublicClientApplication on MAUI to obtain access tokens and attach them to HttpClient requests via a DelegatingHandler for Entra ID protected Aspire APIs.
- Development Workflow: Covers running Aspire AppHost alongside MAUI, using the Aspire dashboard to find API endpoints, emulator certificate handling and debug-time SSL workarounds, and .NET 10+ target TFM alignment.
- Blazor Hybrid Consideration: Explains that authentication occurs at the MAUI layer (not inside the Blazor WebView) and how to expose auth state to Blazor components.
Quick Start
Configure my MAUI app to call the Aspire API using MSAL.NET public client, set the API base URL to 10.0.2.2:7001 for Android emulator and localhost for iOS simulator/mac, and attach bearer tokens via a DelegatingHandler on the typed HttpClient.