Magnetic structure of Sr2IrO4, a new class of Mott insulator, has been determined only by means of resonant X-ray magnetic diffraction. Spectrum of resonant X-ray magnetic scattering also provides information on the ground state electron configurations. Here, we describe in detail how we determined the magnetic structure. The result of the X-ray magnetic scattering study establishes a better understanding of the unconventional insulating nature in this 5d transition metal oxide.