Background: The CNO cycle is the main energy source in stars more massive than our sun; it defines the energy production and the cycle time that lead to the lifetime of massive stars, and it is an important tool for the determination of the age of globular clusters. In our sun about 1.6% of the total solar neutrino flux comes from the CNO cycle. The largest uncertainty in the prediction of this CNO flux from the standard solar model comes from the uncertainty in the $^{14}\mathrm{N}(p,\ensuremath{\gamma})^{15}\mathrm{O}$ reaction rate; thus, the determination of the cross section at astrophysical temperatures is of great interest.Purpose: The total cross section of the $^{14}\mathrm{N}(p,\ensuremath{\gamma})^{15}\mathrm{O}$ reaction has large contributions from the transitions to the ${E}_{x}=6.79\phantom{\rule{4pt}{0ex}}\mathrm{MeV}$ excited state and the ground state of $^{15}\mathrm{O}$. The ${E}_{x}=6.79\phantom{\rule{4pt}{0ex}}\mathrm{MeV}$ transition is dominated by radiative direct capture, while the ground state is a complex mixture of direct and resonance capture components and the interferences between them. Recent studies have concentrated on cross-section measurements at very low energies, but broad resonances at higher energy may also play a role. A single measurement has been made that covers a broad higher-energy range but it has large uncertainties stemming from uncorrected summing effects. Furthermore, the extrapolations of the cross section vary significantly depending on the data sets considered. Thus, new direct measurements have been made to improve the previous high-energy studies and to better constrain the extrapolation.Methods: Measurements were performed at the low-energy accelerator facilities of the nuclear science laboratory at the University of Notre Dame. The cross section was measured over the proton energy range from ${E}_{p}=0.7$ to 3.6 MeV for both the ground state and the ${E}_{x}=6.79\phantom{\rule{4.pt}{0ex}}\mathrm{MeV}$ transitions at ${\ensuremath{\theta}}_{\text{lab}}={0}^{\ensuremath{\circ}}$, ${45}^{\ensuremath{\circ}}$, ${90}^{\ensuremath{\circ}}$, ${135}^{\ensuremath{\circ}}$, and ${150}^{\ensuremath{\circ}}$. Both TiN and implanted-$^{14}\mathrm{N}$ targets were utilized. $\ensuremath{\gamma}$ rays were detected by using an array of high-purity germanium detectors.Results: The excitation function as well as angular distributions of the two transitions were measured. A multichannel $R$-matrix analysis was performed with the present data and is compared with previous measurements. The analysis covers a wide energy range so that the contributions from broad resonances and direct capture can be better constrained.Conclusion: The astrophysical $S$ factors of the ${E}_{x}=6.79\phantom{\rule{4.pt}{0ex}}\mathrm{MeV}$ and the ground-state transitions were extrapolated to low energies with the newly measured differential-cross-section data. Based on the present work, the extrapolations yield ${S}_{6.79}(0)=1.29\ifmmode\pm\else\textpm\fi{}0.04(\mathrm{stat})\ifmmode\pm\else\textpm\fi{}0.09(\mathrm{syst})\phantom{\rule{4pt}{0ex}}\mathrm{keV}\phantom{\rule{0.16em}{0ex}}\mathrm{b}$ and ${S}_{\text{g.s.}}(0)=0.42\ifmmode\pm\else\textpm\fi{}0.04(\mathrm{stat})\phantom{\rule{4pt}{0ex}}\mathrm{keV}\phantom{\rule{0.16em}{0ex}}\mathrm{b}$. While significant improvement and consistency is found in modeling the ${E}_{x}=6.79\phantom{\rule{4.pt}{0ex}}\mathrm{MeV}$ transition, large inconsistencies in both the $R$-matrix fitting and the low-energy data are reaffirmed for the ground-state transition. Reflecting this, a systematic uncertainty of ${}_{\ensuremath{-}0.19}^{+0.09}\phantom{\rule{4pt}{0ex}}\mathrm{keV}\phantom{\rule{0.16em}{0ex}}\mathrm{b}$ is recommended for the ground-state transition.