If you got an 0x406 error - "We can't sign you in right now. Please try again later." - when signing into the Xbox app, here's the solution.
You should install the 'Xbox Identity Provider'. It's available on the Microsoft Store.
Follow the link below.
After this, you can now sign into the Xbox app.