When you buy a mobile phone, it generally comes branded to a mobile provider. When your contract is over, you may decide to move on to another provider. T-Mobile and AT&T are two providers that are easy to switch between, because they both use Global System for Mobile Communications networks. But if you want to take your mobile handset from T-Mobile to AT&T, you have to unlock the subscriber identity module application first.
Turn on your T-Mobile phone. Press *#06# and press the send button. Write down the 15-digit IMEI number that appears on your T-Mobile phone screen.
Call T-Mobile customer service to request the unlock code for your phone, based on the IMEI number. Give T-Mobile your email address to send the unlock code and instructions.
Follow the unlock code instructions you receive in your email to unlock the handset. Remove the SIM card from your T-Mobile phone after you unlock it. Replace it with an AT&T SIM card. Turn the phone back on.