An unlocked iPhone 6 or newer is fully compatible with ATT.
The only way to remove the passcode is to restore the device to factory. You can restore to your latest backup after that; however, if you do not have a current backup, then yes, you will lose data. Try resetting your iPhone if you forgot iPhone passcode and have no other ways to fix it.
If the passcode is forgotten, the device needs to be restored to original default settings using iTunes. From the lock screen, swipe right then enter the passcode if prompted.
AT&T says it will respond to any request to unlock your phone within two business days. Go to att.com/deviceunlock. Read and agree to the eligibility requirements to unlock your device. Complete and submit the request form.
Like AT&T, T-Mobile won't unlock a phone automatically, you must specifically request an unlock. T-Mobile will remove this restriction your iPhone if requested, but there are several requirements you must meet before T-Mobile will approve your request. What is this?
The phone must be locked to AT&T (of course). It can't be reported as lost or stolen (also, of course). It can't be associated with fraudulent or illegal activity (see where we're going here?). All of your iPhone's service commitments and installment plans are completed, and all early termination fees are paid in full.
AT&T can't do anything if it's locked to Cricket. Again, if Cricket refuses to unlock a phone that's locked to them, file a BBB and FCC complaint.
If you have bought an iPhone 7 Plus or iPhone 7 for AT&T, you'll find the device does not come unlocked. Fortunately, if you paid in full for the iPhone 7 you can easily unlock it with AT&T by using a simple iTunes process.
No. T-Mobile is only able to unlock phones purchased directly from them. This even applies to phones from T-Mobile's MVNOs, like Metro. Before switching to T-Mobile, you'll first need to contact your current carrier for a device unlock.
T-Mobile's approach to device unlocking Once a device becomes eligible for unlocking (eligibility criteria are described below), T-Mobile will automatically and remotely unlock the device within two business days if device supports remote unlock. You can check your device's unlock status in your my T-Mobile account.
The catch is that the iPhone has to be unlocked by T-Mobile as you have discovered. Only T-Mobile can unlock that iPhone. T-Mobile, just like any other carrier, has its own requirements that have to be fulfilled before it will unlock the iPhone. Apple has nothing to do with this and will not do anything about it.
Practically all iPhones that Apple released can be used on the T-Mobile network. This includes the T-Mobile unlocked iPhone 6, T-Mobile unlocked iPhone 7, and the newer versions of the smartphone, like the iPhone 8, X, XS, and XR.