You need a constant microwave frequency and a magnetic field of a constant size. For a certain orientation of the magnetic field, determine the g-factor (which is a tensor, so you need to determine the principal components). Then, change the orientation of the applied field with respect to the sample and determine the g-factor again. Do this multiple times (in this case: from 0° to 90°, with intervals of approximately 5°).