Abstract: We investigate the thermodynamic behavior of an ideal quantum gas confined in a box when subjected to a constant external magnetic field B. The generalized magnetizations are defined to be the derivatives of any order with respect to B of the grand-canonical/canonical potential. We prove that they are proportional to the volume and we compute the leading terms. In the end, a few open problems are presented.