Weighing Dark Matter Halos with the Cosmic Microwave Background