So AT&T allowed you to use the phone on their service? I thought each company, especially T-Mobile, use sim locks on their phones that can only be removed with a code.
A code that can usually only be obtained from the service provider, and only if you have no outstanding debts to them, or the phone wasn't reported stolen. Unless you have had it unlocked through another source, in which case, why even ask?