Whenever I try to install Minecraft Windows 10 edition in the Microsoft Store, I get the error code, but when I try to use my account on another PC, it works.
I think it's about Windows, not the XBOX… But I may be mistaken.
Try it
Press Windows Key + R.
Type, WSReset.exe, then hit enter.