We present a model of suprathermal electrons in the ionsophere and plasmasphere based on a solution to the kinetic equation along the entire length of a closed magnetic field line, that is, simultaneously for the two conjugate ionospheres and the plasmasphere. We call this the unified approach. It allows the determination of the distribution in energy and pitch-angle of photoelectrons along the complete length of the field line thereby avoiding the introduction of artificial boundaries between the ionosphere and magnetosphere and, consequently, avoids problems introduced by the uncertainty of these boundary conditions. In addition, it automatically accounts for backscattered electrons in the atmosphere and plasmasphere, and avoids splitting photoelectrons into a loss-cone and a trapped population. The method is not limited to specific situations such as conjugated sunrise or symmetrical illumination of hemispheres, but is equally applicable to arbitrary illumination conditions.