  We study the symmetry resolution of the entanglement entropy of an interval
in two-dimensional conformal field theories (CFTs), by relating the bipartition
to the geometry of an annulus with conformal boundary conditions. In the
presence of extended symmetries such as Kac-Moody type current algebrae,
symmetry resolution is possible only if the boundary conditions on the annulus
preserve part of the symmetry group, i.e. if the factorization map associated
with the spatial bipartition is compatible with the symmetry in question. The
partition function of the boundary CFT (BCFT) is then decomposed in terms of
the characters of the irreducible representations of the symmetry group
preserved by the boundary conditions. We demonstrate that this decomposition
already provides the symmetry resolution of the entanglement spectrum of the
corresponding bipartition. Considering the various terms of the partition
function associated with the same representation, or charge sector, the
symmetry-resolved R\'enyi entropies can be derived to all orders in the UV
cutoff expansion without the need to compute the charged moments. We apply this
idea to the theory of a free massless boson with $U(1)$, $\mathbb{R}$ and
$\mathbb{Z}_2$ symmetry.
