That would depend on which Dragon Age you are playing. In Origins, you can side with Greagoir in the Tower of Magi by saying "Annulment is the only option." Alternatively, if you're just looking for the achievement and don't want the disapproval of any mage-friendly party members, simply don't use the Litany of Adralla in the fight against Uldred. He will turn all the mages into abominations and the game will interpret this as siding with the templars.
In Dragon Age II, simply side with the templars in the final quest, The Last Straw.