Hello Sikandar,
Welcome to Microsoft Q&A forum.
This error usually means there is something wrong with the sign in of the services. So before we proceed, may I know if there are any other apps that is having this issue. Also, can you sign in to the Microsoft Website and Xbox website normally?
In the meantime, please try these steps to see if it can find a fix.
- Type "Command Prompt" in the search bar and select "Run as administrator"
- Type DISM /Online /Cleanup-Image /RestoreHealth and press Enter.
- When the scan is done, type sfc /scannow and press Enter.
If that doesn't work, please verify to see if Xbox Gaming Services is currently running. Additionally, you can try to create another user profile to see if the apps and the game works on that profile.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.