1. This Directive applies to third-country nationals residing legally in the territory of a Member State.
2. This Directive does not apply to third-country nationals who:
(a) reside in order to pursue studies or vocational training;
(b) are authorised to reside in a Member State on the basis of temporary protection or have applied for authorisation to reside on that basis and are awaiting a decision on their status;
(c) are authorised to reside in a Member State on the basis of a form of protection other than international protection or have applied for authorisation to reside on that basis and are awaiting a decision on their status;
(d) have applied for international protection and whose application has not yet given rise to a final decision;
(e) reside solely on temporary grounds such as au pair or seasonal worker, or as workers posted by a service provider for the purposes of cross-border provision of services, or as cross-border providers of services or in cases where their residence permit has been formally limited;
(f) enjoy a legal status governed by the Vienna Convention on Diplomatic Relations of 1961, the Vienna Convention on Consular Relations of 1963, the Convention of 1969 on Special Missions or the Vienna Convention on the Representation of States in their Relations with International Organisations of a Universal Character of 1975.
3. This Directive shall apply without prejudice to more favourable provisions of:
(a) bilateral and multilateral agreements between the Community or the Community and its Member States, on the one hand, and third countries, on the other;
(b) bilateral agreements already concluded between a Member State and a third country before the date of entry into force of this Directive;
(c) the European Convention on Establishment of 13 December 1955, the European Social Charter of 18 October 1961, the amended European Social Charter of 3 May 1987, the European Convention on the Legal Status of Migrant Workers of 24 November 1977, paragraph 11 of the Schedule to the Convention Relating to the Status of Refugees of 28 July 1951, as amended by the Protocol signed in New York on 31 January 1967, and the European Agreement on Transfer of Responsibility for Refugees of 16 October 1980.