How is Cosmic Microwave Background's temperature measured?
That is what is done.  This is shown in an old xkcd comic https://xkcd.com/54/



The curve shows the distribution of frequencies in the CMB, and by using the marked value of the maximum you can determine the value of T, the apparent (red-shifted) temperature of the CMB