A search for supersymmetry is presented where at least one Higgs boson is produced and decays to two photons in the decay chains of the pair-produced supersymmetric particles. The presence of charged leptons and additional Higgs boson candidates and various kinematic variables are used to categorize events into search regions which are sensitive to different supersymmetry scenarios. The results are based on data from proton-proton collisions at the Large Hadron Collider at a center of mass energy of 13~\mathrm{TeV} collected by the CMS experiment in 2016 and 2017, corresponding to 77.5~\mathrm{fb}^{-1}. No statistically significant excess of events is observed relative to standard model expectations. We exclude bottom squark pair production for bottom squark masses below 530~\mathrm{GeV} and an LSP mass of 1~\mathrm{GeV}; wino-like chargino-neutralino production for chargino and neutralino masses below 235~\mathrm{GeV} with gravitino masses of 1~\mathrm{GeV}; and higgsino-like chargino-neutralino production for neutralino masses below 290~\mathrm{GeV}, for the case where the neutralino decays to a Higgs boson and a gravitino of the time.