No contractor as defined in section 32-1101 shall act as agent or commence or maintain any action in any court of the state for collection of compensation for the performance of any act for which a license is required by this chapter without alleging and proving that the contracting party whose contract gives rise to the claim was a duly licensed contractor when the contract sued upon was entered into and when the alleged cause of action arose.
A.R.S. § 32-1153