So many client's of ours end up in trouble because they hire unlicensed subcontractors. They tell me I've used the guy a hundred times and his work is always good. He's cheaper than the other subs and does great work. But, Contracting with an unlicensed person violates the California Licensing Law at Business and Professions Code Section 7118. https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=BPC§ionNum=7118.
Not only can you be disciplined including a fine and up to suspension or forfeiture of your license, but the owner could sue you for disgorgement of all monies it paid that you received for the unlicensed contractor's work under Business and Professions Code Section 7031. https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?sectionNum=7031.&lawCode=BPC
The disgorgement includes labor and materials, so if you already paid the unlicensed subcontractor and the owner finds out it will come after you for the refund and you will probably never get the money back from the unlicensed subcontractor.