Fundamental equation of thermodynamics for magnetocaloric materials
The fundamental equation for paramagnetic system is as follows
$$dU=TdS+BdM+\mu dN$$
Where B is the external magnetic field intensity and M is the magnetic moment (Here I have neglected the P-V work of the system). For your chemically pure and non-reactive system the above equation simplifies to
$$dU=TdS+BdM$$
Using Legendre Transformations:
$$y(0)=U(S,M)$$
$$dy(0)=dU=TdS+BdM$$
$$dy(1)=dA(T,M)=-SdT+BdM$$
$$dy(2)=dG(T,B)=-SdT-MdB$$ 
Now changing the order of the equation, we can find enthalpy,
$$y(0)=U(M,S)$$
$$dy(0)=dU=BdM+TdS$$
$$dy(1)=dH(S,B)=-MdB+TdS$$