In this article, we have explored the resonance behavior of a particle in the presence of a time dependent magnetic field (TDMF). The particle is bound in a harmonic potential well. Based on the Hamiltonian description of the system in terms of action and angle variables, we have derived the resonance condition for the applied TDMF along z-direction which is valid for arbitrary frequencies along x and y directions of the two dimensional harmonic oscillator. We have also derived resonance condition for the applied magnetic field which is lying in a plane. Finally, we have explored resonance condition for the isotropic magnetic field. To check the validity of the theoretical calculation, we have solved equations of motion numerically for the parameter sets which satisfy the derived resonance condition. The numerical experiment fully agrees with the theoretically derived resonance conditions.