Yes, Turkey’s intervention on Cyprus in 1974 was legal based on the general principles:
1. Applications of sanctions
Till now, there is NO sanction applied on Turkey due to 1974 Cyprus war.
If a country invades another one, UN imposes sanctions on that country. Iraq invaded Kuwait, and UN imposed sanctions on Iraq. Turkey did not invade Cyprus, hence UN did not impose any sanction on Turkey.
2. The appearance of phrase "invasion" in UN Security Council resolutions
There is no UN Security Council resolution that calls the Turkey’s 1974 action as "invasion".
3. The first hand decisions of The Parliamentary Assembly of the Council of Europe (PACE)
PACE(29.07.1974, Resolution 573): "The Turkish military INTERVENTION was the exercise of a RIGHT EMANATING FROM AN INTERNATIONAL TREATY and the fulfilment of a LEGAL and MORAL obligation."
4. Greece’s court decisions
Athens Court of Appeals (21.03.1979; Case No: 2658/79): “The Turkish military INTERVENTION in Cyprus, which was carried out in accordance with the Zurich and London Accords, was LEGAL. Turkey, as one of the Guarantor Powers, had the right to fulfill her obligations. The real culprits ... are the Greek officers who engineered and staged a coup and prepared the conditions for this INTERVENTION."
Note: Just after 5 years later than 1974, in 1979, Greece’s Highest Court decided Turkish military intervention is legal without making any difference between 1st and 2nd military operation.
5. Makarios (Then-President of Cyprus) speech during the period covering both the coup and the intervention
Makarios (the UN Security Council Speech, 19 July 1974): "CYPRUS WAS INVADED BY GREECE".
Sound record of the speech
6. Treaty of Guarantee of 1960
Turkey acted on Cyprus via Article IV(2) Treaty of Guarantee ("In the event of a breach of the provisions of the present treaty, Greece, Turkey and the United Kingdom undertake to consult together with respect to the representations or measures necessary to ensure observance of those provisions. IN SO FAR AS COMMON OR CONCERTED ACTION MAY NOT PROVE POSSIBLE, EACH of the three GUARANTEEING POWERs reserves THE RIGHT TO TAKE ACTION with the sole aim of re-establishing the state of affairs created by the present Treaty."), hence in compatible with Art. 2(4) UN Charter.