PAC CLI 2.8.1 crashes with System.NullReferenceException during pac auth create on macOS 26.5.1
Summary
Power Platform CLI installs successfully and all non-authentication commands work. However, every authentication-related command crashes with a System.NullReferenceException before the authentication flow starts.
This prevents authentication and blocks Power Platform Code Apps development on macOS.
Environment
-
Operating System: macOS 26.5.1 (Build 25F80)
-
Architecture: Apple Silicon (arm64)
-
.NET SDK: 10.0.301
-
.NET Runtime: 10.0.9
-
Power Platform CLI: 2.8.1
-
Installation Method:
dotnet tool install --global Microsoft.PowerApps.CLI.Tool
Steps to Reproduce
-
Install .NET SDK 10.
-
Install the latest Power Platform CLI:
dotnet tool install --global Microsoft.PowerApps.CLI.Tool
-
Verify the CLI is installed:
pac
-
Execute any authentication command:
pac auth create
or
pac auth create --deviceCode
or
pac auth list
Expected Behavior
The CLI should start the authentication flow by opening a browser or displaying a device code, allowing the user to authenticate successfully.
Actual Behavior
The CLI immediately terminates with:
Sorry, the app encountered a non-recoverable error and will need to terminate.
Exception Type:
System.NullReferenceException
The authentication flow never starts.
Diagnostic Log
The log shows that the CLI attempts to create an operating system authentication profile before starting authentication:
TryCreateAuthProfileFromOperatingSystemAsync
It then crashes inside the Microsoft Authentication Library (MSAL):
Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker
System.NullReferenceException
The stack trace indicates the exception originates from the RuntimeBroker initialization:
Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker..ctor(...)
Microsoft.Identity.Client.Broker.BrokerExtension.AddRuntimeSupport(...)
Microsoft.Identity.Client.PlatformsCommon.Shared.AbstractPlatformProxy.CreateBroker(...)
The crash occurs before browser authentication or device code authentication begins.
Additional Information
-
pacstarts successfully. -
pac helpworks correctly. -
The issue occurs with:
-
pac auth create -
pac auth create --deviceCode -
pac auth list
-
-
A clean reinstall of:
-
.NET SDK
-
Power Platform CLI
-
VS Code
does not resolve the issue.
-
-
The issue reproduces consistently.
Impact
This issue prevents authentication to Power Platform environments and blocks development using Power Platform CLI and Power Platform Code Apps on macOS.
Question
Is this a known compatibility issue between PAC CLI 2.8.1 / MSAL RuntimeBroker and macOS 26.5.1?
If so:
-
Is there a recommended workaround?
-
Is there a newer CLI build or hotfix that resolves this issue?
-
Is there a way to disable RuntimeBroker initialization so that browser or device code authentication can proceed?

Report
All responses (
Answers (