Under extremely high pressure and extremely low temperature. This is because part of the requirements of an ideal gas is that the atoms/molecules don't interact which brakes down at low temperatures and the atoms/molecules are point masses that have insignificant volumes compared to the volume the gas is in which breaks down at high pressures.