After decades of searches, the nature of dark matter (DM) remains an unsolved problem. This forces us to look at existing models from new angles, and to explore (or re-explore) DM candidates beyond the standard weakly-interacting massive particle. In this talk, I will focus on what one can learn from the cosmic microwave background (CMB) frequency spectrum and anisotropies. After reviewing CMB physics, I will first describe how the CMB can test DM-baryon scattering. I will outline a recently developed Boltzmann-Fokker-Planck formalism, which allows to account for finite DM self-interactions in addition to scattering with baryons. In the second part of the talk, I will discuss an old DM candidate brought back to the front page by LIGO: primordial black holes (PBHs). I will describe the simple accretion model underlying CMB bounds to PBHs, as well as some directions of possible improvements to this calculation.