windows.internal.shellcommon.tokenbrokermodal.dll Error in Windows 10 and 11: Windows account prompt handoff

An approved Windows app signs in directly, but its account prompt loops or closes and a diagnostic names windows.internal.shellcommon.tokenbrokermodal.dll.
The Windows file inventory identifies windows.internal.shellcommon.tokenbrokermodal.dll as Token broker default shell contract handler. Capture the actual error, file path and Windows build before making changes.
Check where the error occurs
Verify the intended account and check time and working connectivity. Note whether the loop occurs before or after the official account chooser without collecting authentication material.
Repair the affected feature
Update the affected app and Windows. Use the original account provider's approved sign-in or IT procedure to resolve a verified account mismatch.
If Windows reports corruption of a protected system file, use Microsoft’s system file repair procedure. Obtain software and drivers through Windows Update or the applicable publisher.
Verify the repair
Repeat the same permitted prompt and confirm it returns to the intended app with its expected account instead of reopening the chooser.
See the publisher’s guidance, the exact Windows file record, and the related PC Repair Atlas guide.