A method for preparation of a sulfonic and or sulfonic acid salt containing polyimide resins comprising melt reaction of a polyimide resin with an organic compound, wherein the organic compound contains at least one aliphatic primary amine functionality and at least one other functionality selected from the group consisting of sulfonic acids, sulfonic acid salts or mixtures thereof.