I had the very same issue, and after hours of frustration (attempting to follow a range of answers online - all of which were unsuccessful), I managed to find a very simple solution.
Firstly, this is how the problem occurred to begin with. I had become used to signing in with a pin (rather than my password) and I forgot my password. I needed to access my Microsoft Account on another device (my home laptop), so I did so by changing my
password on my home device (to one I could remember).
My work device requires my Microsoft Account password in order to sign in to my computer (something Microsoft recommends when you install Windows 10). However, for whatever reason, my work device had detected that my password had changed, but would not recognise
the new password I had created. When trying to sign in, I was continually faced with the message:
"Your device is offline. Please sign in with the last password used on this device."
My immediate thought was to connect to Wifi (as you have that option at the sign-in screen). But I could not connect to any Wifi connection. I tried resetting, turning off and on, and attempting to connect to Wifi again. Nothing worked. I tried all the passwords
I could think of, I even tried the last gmail password I had used (in some desperate sort of hope) - all to no avail.
Naturally, I searched the internet for advice (on my mobile). Many people advised I run a Command Prompt through the boot menu (by holding 'Shift+Reset' at the sign-in screen). But because I couldn't sign-in with my password when attempting to run the Command
Prompt (and it does ask you for this just before you can launch it), my computer wouldn't recognise me as the administrator, so that didn't work either! Therefore, I could enter none of the very complex (for me at least) commands, which a plethera of 'experts'
recommended online.
Finally I entered a Microsoft Help Chat, and I was given a solution (though I need to clarify each step below). This will save you much time and effort, and no doubt preserve your sanity.
Now, here's what I did in order to completely solve the problem. It was very, very simple.
1. I changed my Microsoft Account password to one I now knew (so if you haven't done this, do this on another device! It's rather straightforward, and will only take 2mins).
2. I then connected my computer to a router with an ethernet cable (creating a wired connection), and turned my Wifi 'off' at the sign-in screen, so my wired ethernet connection was the only connection.
3. I entered my new Microsoft Account password (created on another device). And... it took a while to sign-in, but I now had access to my computer again! (What a relief!)
THEN, and most importantly:
4. I opened the start menu.
5. I selected 'settings'.
6. I selected 'accounts'.
7. I then selected 'create an local/offline login'
You have to create a username and password here, but basically by doing this you can opt-out of using your Microsoft Account to sign in to your computer. It will completely prevent any chance of this happening again! Just make sure it's a password you can
remember, and that your password hint is a good one!
I hope this helps anyone who has found themselves in a situation similar to mine. The whole thing was rather frustrating, especially as I only have Wifi at work (I work at a university) so I had to take my device to a friend's house to use his wired connection.
But it solved the problem completely for me, and prevented it ever happening again!