Using a quantum electrodynamical approach, we derive the scattering phase matrices for polarized radiation in forbidden line transitions and in the presence of an external magnetic fields. The case of (J = 0 → 2 → 0) scattering is considered as an example. The non-magnetic Rayleigh scattering phase matrix is also presented. The Stokes profiles in a single scattering event are computed for the strong field (Zeeman) and weak field (Hanle) limits, covering also the regime of intermediate field strengths (Hanle-Zeeman).