Skip to content

[WIP] [.NET 10] Add .NET MAUI Blazor Hybrid sample using Entra workforce ID#656

Draft
mattleibow wants to merge 1 commit intodotnet:mainfrom
mattleibow:dev/maui-blazor-web-workforce-10
Draft

[WIP] [.NET 10] Add .NET MAUI Blazor Hybrid sample using Entra workforce ID#656
mattleibow wants to merge 1 commit intodotnet:mainfrom
mattleibow:dev/maui-blazor-web-workforce-10

Conversation

@mattleibow
Copy link
Copy Markdown
Member

Add a complete .NET MAUI Blazor Hybrid + ASP.NET Core Web App sample that authenticates against a Microsoft Entra workforce (business) tenant using MSAL.NET and Microsoft.Identity.Web.

Architecture

Project Description
MauiBlazorWebEntraWorkforce .NET MAUI Blazor Hybrid app (Android, iOS, Mac Catalyst, Windows)
MauiBlazorWebEntraWorkforce.Shared Razor Class Library with shared UI components
MauiBlazorWebEntraWorkforce.Web ASP.NET Core Blazor Server web app + API

Key features

  • Dual auth: OIDC + Cookie for web browser, JWT Bearer for MAUI API calls
  • WAM broker integration on Windows for SSO with workforce accounts
  • Mac Catalyst workaround using ASWebAuthenticationSession (MSAL lacks maccatalyst TFM)
  • SecureStorage token cache persistence on Windows and Mac Catalyst
  • Interactive PowerShell setup/teardown scripts for Azure app registrations
  • Open-redirect protection on login endpoint

Relationship to #649

This is the workforce tenant counterpart to the External ID (CIAM) sample in #649. Key differences:

  • Authority: login.microsoftonline.com/{tenantId} instead of {tenant}.ciamlogin.com
  • No self-service registration (workforce users are admin-managed or invited)
  • WAM broker enabled on Windows (supports workforce SSO)
  • preferred_username claim instead of CIAM emails claim

Add a complete .NET MAUI Blazor Hybrid + ASP.NET Core Web App sample
that authenticates against a Microsoft Entra workforce (business)
tenant using MSAL.NET and Microsoft.Identity.Web.

Three projects:
- MauiBlazorWebEntraWorkforce: MAUI app (Android, iOS, Mac Catalyst, Windows)
- MauiBlazorWebEntraWorkforce.Shared: Razor Class Library with shared UI
- MauiBlazorWebEntraWorkforce.Web: ASP.NET Core Blazor Server web app + API

Includes:
- Interactive setup/teardown PowerShell scripts for Azure app registrations
- Dual auth: OIDC+Cookie for web, JWT Bearer for MAUI API calls
- WAM broker integration on Windows for SSO
- Mac Catalyst workaround using ASWebAuthenticationSession
- SecureStorage token cache persistence on Windows and Mac Catalyst

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow mattleibow changed the title [.NET 10] Add .NET MAUI Blazor Hybrid sample using Entra workforce ID [WIP] [.NET 10] Add .NET MAUI Blazor Hybrid sample using Entra workforce ID Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant