The behaviour of superconducting junctions of SNINS-type (where S is superconductor, N is normal metal, I is insulator) with anharmonic current-phase relations in the external magnetic field near the critical temperature was investigated. The dependence of the maximum current on the value of the magnetic flux in a wide range of electron transmission coefficient values was considered. Also, it was investigated how the presence of a normal layer of an arbitrary thickness in the scale of coherence length and in the presence of impurities in superconducting regions affect the sensitivity of the maximum current to the magnetic field magnitude.