We study the sensitive detection of a weak static magnetic field via Faraday rotation induced by an ensemble of spins in a bimodal degenerate microwave cavity. We determine the limit of the resolution for the sensitivity of the magnetometry achieved using either single-photon or multiphoton inputs. For the case of a microwave cavity containing an ensemble of Nitrogen-vacancy defects in diamond, we obtain a magnetometry sensitivity exceeding 0.5 nT/ √ Hz, utilizing a single photon probe field, while for a multiphoton input we achieve a sensitivity about 1fT/ √ Hz, using a coherent probe microwave field with power of Pin = 1 nW.