Hi @Rahul Malhi,
Welcome to Microsoft Q&A forum.
Thank you for reaching out regarding the sign-in issue you're experiencing with the Xbox app. The error code 0x80004005 typically points to a synchronization or credential conflict between your Windows account and the Xbox Live servers.
Please try the following three troubleshooting steps to resolve the issue:
1/ Synchronize your system clock
Xbox Live requires your system time to be perfectly synced for security "handshakes." If your clock is off by even a few seconds, the login will fail.
- Go to Settings > Time & Language > Date & Time.
- Ensure Set time automatically is toggled On.
- Click the Sync now button under "Additional settings" to force a refresh.
2/ Repair and reset the Xbox app
This will clear the app's cache without deleting your games.
- Go to Settings > Apps > Installed Apps.
- Find the Xbox app, click the three dots (...), and select Advanced options.
- Scroll down and click Repair. If that doesn't work, click Reset.
- Repeat these same steps for the Microsoft Store app and Gaming Services.
3/ Clear stored Xbox credentials
Windows may be holding onto a corrupted login "token." Clearing this forces the app to request a fresh login.
- Open the Start Menu, type Credential Manager, and open it.
- Select Windows Credentials.
- Scroll down to the Generic Credentials section.
- Look for any entries starting with
XblDeviceKeyorXbl| (e.g., Xbl|DeviceKey). - Click on them and select Remove.
- Restart your computer and try to sign in to the Xbox app again.
I hope one of these steps gets you back into your games. If the error persists after trying these, please let me know.