When I purchased a new machine to replace my Win8.1 computer with Windows 10 pre-installed, I had problems signing into the Xbox App. (The common error was a 0x406 error.)
This affected Microsoft Casual Games (Solitaire, etc.) and other Xbox games, wherein the associated Xbox app could not allow for a sign in.
The solution to this problem is to install the “Xbox Identity Provider”; I could not find this app using the Windows 10 Store search box, but this app is available from the Microsoft Store at:
https://www.microsoft.com/store/apps/9wzdncrd1hkw
After installing this TSR App, I can now sign into Xbox normally.
Just thought this would help others with similar problems…;)