; or (B) (i) is prima facie eligible to file an application under subsection (a); and (ii) indicates that he or she intends to file such an application. (2) Exception Paragraph (1) shall not apply to any alien whose application under subsection (a) has been denied by the Secretary of Homeland Security in a final administrative determination. (3) During certain proceedings (A) In general Except as provided in subparagraph (B) and notwithstanding any provision of the Immigration and Nationality Act ( 8 U.S.C. 1101 et seq.), the Secretary of Homeland Security may not order any alien to be removed from the United States if the alien raises, as a defense to such an order, the eligibility of the alien to apply for adjustment of status under subsection (a). (B) Exception Subparagraph (A) shall not apply to any alien whose application under subsection (a) has been denied by the Secretary of Homeland Security in a final administrative determination. (4) Work authorization The Secretary of Homeland Security— (A) shall authorize any alien who has applied for adjustment of status under subsection (a) to engage in employment in the United States while such application is pending; and (B) may provide such alien with an employment authorized endorsement or other appropriate document signifying such employment authorization. (d) Adjustment of status for spouses and children (1) In general Notwithstanding section 245(c) of the Immigration and Nationality Act ( 8 U.S.C. 1255(c) ) and except as provided in paragraphs (2) and (3), the Secretary of Homeland Security shall adjust the status of an alien to that of an alien lawfully admitted for permanent residence if the alien— (A) is the spouse, domestic partner, child, or unmarried son or daughter of an alien whose status has been adjusted to that of an alien lawfully admitted for permanent residence under subsection (a); (B) is physically present in the United States on the date on which the alien files an application for such adjustment of status