Outlook.com: Invalid Credentials

I’m trying to connect to an Outlook.com account, but I’m getting “Invalid Credentials”. I know my username and password are correct! What’s going on, and how do I fix this?

If you’ve verified that your email and password are correct, Microsoft may be blocking your Mailspring login attempts with a security challenge.

To resolve the problem, visit account.live.com/activity. If your account is affected, you’ll see a “Security challenge” section like in the screenshot below. (You’ll need to click the header to display all details!)

Click the “This is me” button, then try connecting your account to Mailspring again.