A few months ago, I forgot my Apple ID password and entered it incorrectly several times while trying to install an app. Apple then locked the account, and support told me that the Apple ID could no longer be found. The iPhone is still signed in to that account, so I can't erase it normally because it asks for the Apple ID password. The Apple Devices app on Windows also doesn't detect the phone when I connect it. I'd like to clear the device before selling it to a friend. What options do I have if the Apple ID was deleted, disabled, or otherwise unavailable?
3 Answers
I’d avoid third-party tools that claim to remove an unknown Apple ID. They can be unreliable, may damage the device, and generally can’t legitimately remove Apple’s server-side Activation Lock. The safest route is to keep trying through Apple’s official account-recovery or Activation Lock process and provide proof of purchase.
There may be a few different explanations: the account could have been disabled, deleted, or changed to a different email address. If Find My is still enabled, the important issue is Activation Lock. You can submit Apple’s Activation Lock removal request and include the original purchase receipt or invoice. If Apple can verify ownership, they may be able to remove the lock.
Erasing the phone and removing the Apple ID are separate things. You can usually restore an iPhone through recovery mode or DFU mode even if the normal software doesn’t detect it, but that will not bypass Activation Lock. After the restore, the phone can still ask for the previous Apple ID unless Find My has been removed.

I may have already submitted the invoice once, but I’m going to try the ownership-verification process again and make sure the receipt has all the relevant details.