"an illegal state change was requested."

matthew 0 Reputation points
2026-03-14T12:03:24.7533333+00:00

so a year ago my microsoft account was hacked and the gmail for that microsoft account was changed i really tried to recover that account back but unfortunately i couldnt. then i also just for some reason i didnt log out of that microsoft account like it showed that i was still signed in but i needed to verify that its me but like i just didnt touch that because i couldnt verify now i made a new microsoft account with the same gmail i used in my old microsoft account and now its showing me "an illegal state change was requested."when i try to log in on the microsoft account in my pc.

Windows for home | Windows 11 | Accounts, profiles, and login
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-03-14T12:03:43.73+00:00

    The error is caused by the old, partially signed‑in, compromised Microsoft account still being cached on the PC while a new Microsoft account using the same Gmail address now exists. The PC is trying to use an invalid/blocked sign‑in state for that old account.

    Because the original account was hacked and its security info/email were changed, only Microsoft’s official recovery and security processes can resolve the underlying account state. Use these steps:

    1. Check for unusual or blocked activity
      • Go to the Security basics page and sign in with the current Microsoft account that uses the Gmail address.
      • Select Review activity and check the Recent activity page. If any sign‑ins or attempts are not recognized, expand them and choose This wasn’t me (for Unusual activity) or Secure your account (for Recent activity). This ensures the current account is secure.
      • If there is any sign that someone else may have accessed the current account, go back to Security basics and select Change password to set a strong new password.
    2. If the old hacked account is still needed, attempt recovery
      • If the old account itself was hacked and cannot be accessed, follow the guidance in How to recover a hacked or compromised Microsoft account and use the sign‑in helper tool: it will ask for the email or phone and either show self‑help options or offer a chance to talk to an agent.
      • If recovery fails and the attacker changed security info or enabled two‑step verification, recovery might not be possible; in that case, continue using only the new account and remove traces of the old one from the PC.
    3. Handle “security info change is still pending” (if shown)
      • If any sign‑in shows messages like “Your security info change is still pending” or “You can't access this site right now”, it means all previous security info was removed and replaced, and the account is in a restricted 30‑day state. During that period, access is limited and the change cannot be bypassed.
    4. Clean up the old account on the PC
      • On the Windows 11 PC, remove the old Microsoft account profile and cached sign‑in from Settings → Accounts (e.g., under Email & accounts, Access work or school, or Family & other users, depending on where it appears) and then sign in only with the new Microsoft account.
      • If the PC is still trying to use the old token, fully sign out of all Microsoft apps (Store, Xbox, Office, etc.), restart the PC, and then sign in again with the new account.
    5. If sign‑in problems persist
      • Use the guidance in I can't sign in to my Microsoft account and, if needed, choose I need to talk to a customer support agent to contact Microsoft Support. Explain that a hacked account using the same Gmail address existed previously and that the PC now shows “an illegal state change was requested” when signing in.

    These steps ensure the current account is secure, remove the invalid cached state from the PC, and route any remaining account‑state issues through Microsoft’s official recovery and support channels.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.