  Reproducing the integer count of black hole micro-states from the
gravitational path integral is an important problem in quantum gravity. In this
paper, we show that, by using supersymmetric localization, the gravitational
path integral for $\frac{1}8$-BPS black holes in $\mathcal{N}=8$ supergravity
reproduces the index obtained in the string theory construction of such black
holes, including all non-perturbatively suppressed geometries. A more refined
argument then shows that, not only the black hole index, but also the total
number of black hole microstates within an energy window above extremality that
is polynomially suppressed in the charges, also matches this string theory
index.
  To achieve such a match we compute the one-loop determinant arising in the
localization calculation for all $\mathcal{N}=2$ supergravity supermultiplets
in the $\mathcal{N}=8$ gravity supermultiplet. Furthermore, we carefully
account for the contribution of boundary zero-modes, that can be seen as
arising from the zero-temperature limit of the $\mathcal{N}=4$
super-Schwarzian, and show that performing the exact path integral over such
modes provides a critical contribution needed for the match to be achieved. A
discussion about the importance of such zero-modes in the wider context of all
extremal black holes is presented in a companion paper.
