The Kosterlitz-Thouless phase transition in a system of exciton-polaritons in a microcavity is studied. The transition temperature to superfluid state was found as a function of exciton-photon detuning. A nonquadratic dispersion law was taken into account in the framework of the self-consistent harmonic approximation (SCHA).