You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Connect-AzAccount interactive login fails on macOS (Apple Silicon): "Interactive requests with mac broker enabled must be executed on the main thread"Β #29941
Connect-AzAccount (interactive browser flow) fails on macOS with the following error, starting in Az.Accounts 5.5.1:
WARNING: Unable to acquire token for tenant 'organizations' with error
'InteractiveBrowserCredential authentication failed: Interactive requests
with mac broker enabled must be executed on the main thread on macOS.'
Connect-AzAccount: InteractiveBrowserCredential authentication failed:
Interactive requests with mac broker enabled must be executed on the main
thread on macOS.
Environment
Az.Accounts version (broken): 5.5.1
Az.Accounts version (last known good): 5.2.0
OS: macOS (Apple Silicon)
PowerShell: 7.6.4 (pwsh)
Shell/terminal: zsh, running inside Ghostty
Steps to reproduce
Install Az.Accounts 5.5.1 (via Install-Module -Name Az -Repository PSGallery)
Run Connect-AzAccount
Observe the error above instead of a browser window opening
Expected behavior
Interactive browser login opens as it did on 5.2.0.
Connect-AzAccount -UseDeviceAuthentication also works around it without downgrading, but the standard interactive flow should not require this.
Additional notes
This appears to be caused by the MSAL mac-broker interactive auth path requiring main-thread execution, which isn't guaranteed when pwsh is run from a non-default terminal host.
Duplicate of #29940 (filed from a different account by mistake; leaving that one open too so a maintainer can dedupe).
Reacted by Garrett H, ssian2, kennethjeppesen and CaffeineOgre
If I downgrade and perform the first Connect-AzAccount, then I can upgrade and Disconnect-AzAccount and Connect-AzAccount at-will (all with the same account. Haven't tried with different accounts yet.)
Activity
github-actions commentedon Jul 31, 2026
Here are some similar issues that might help you. Please check if they can solve your problem.
Powered by issue-sentinel
uffectivevital commentedon Jul 31, 2026
It is not similar, it's the exact same and it's closed. The error on this one is still present.
garretth9 commentedon Aug 4, 2026
In my own case reverting to 5.4.0 also fixed the issue, but both 5.5.1 and 5.5.2 resulted in the error above.
CaffeineOgre commentedon Oct 13, 2026
I've also run into this regression with 5.5.3.
If I downgrade and perform the first
Connect-AzAccount, then I can upgrade andDisconnect-AzAccountandConnect-AzAccountat-will (all with the same account. Haven't tried with different accounts yet.)