The variation of band bending as a function of composition at oxidized (0001) surfaces of Mg-doped ${\mathrm{In}}_{x}{\mathrm{Ga}}_{1\ensuremath{-}x}\mathrm{N}$ is investigated using x-ray photoelectron spectroscopy. Distinctly different trends in barrier height are seen for the Mg-doped compared to undoped alloys, which is explained in terms of Fermi-level pinning at the surface and virtual gap states. Solutions of Poisson's equation within the modified Thomas-Fermi approximation are used to model the band bending and corresponding variation of carrier concentration with depth below the surface. A transition from a surface inversion layer for In-rich alloys to a surface hole depletion layer for Ga-rich alloys occurs at $x\ensuremath{\approx}0.49$. The trend in barrier height, calculated space-charge profiles, and difference of barrier height for undoped and Mg-doped InN indicate that Mg doping induces bulk $p$-type conductivity across the entire composition range.