Appeal from a judgment entered in favor of plaintiff and against defendant for an alleged commission under a written contract of employment. The facts are clear and without dispute.
Real Estate Brokers and Salesmen were regulated under Title 82, Chapter 2, U.C.A. 1943 which is presently designated as Title 61, Chapter 2, U.C.A.1953. This title requires brokers and salesmen to be licensed by the State Securities Commission. A condition for such license is that the brokers shall be bonded and that salesmen shall work only under the supervision of a licensed and bonded broker. Plaintiff, desiring to sell real estate, approached one Bardsley, a licensed and bonded broker, sometime in the forepart of 1949 and requested permission to sell under Bardsley’s authorization. Permission was granted by Bards-ley and plaintiff was licensed as a real estate salesman in accordance with the statutory requirements. Bardsley, however, did not intend to conduct a brokerage or to be active in the real estate business. Hence, plaintiff and Bardsley expressly agreed that plaintiff was to act independently of Bardsley; was to pay all expenses; retain all commissions; and Bardsley was to take no responsibility and was to be implicated in none of plaintiffs transactions.
On June 12, 1949 defendant listed his property for sale with plaintiff. A standard real estate listing agreement *371was signed by defendant and accepted by plaintiff. This agreement gave plaintiff, for a period of six months, the exclusive right to sell the property, and it further provided that if such property were sold within three months after the expiration of the six-month period to any person to whom the plaintiff had previously offered the property, then the agreed commission would be paid to plaintiff. Bardsley was not consulted by either plaintiff or defendant; was not a party to the agreement; and knew nothing thereof.
Upon several occasions plaintiff offered the property to one King, but closed no sale since King considered the asking price too high. The six-month period ended on December 12, 1949. Plaintiff, with defendant’s permission, continued showing the property to various parties and some time in the forepart of February, 1950, the defendant reduced the asking price by $1,000. Plaintiff again contacted Mr. King and told him of the reduction. King stated that in view of the price decrease he was interested in the property, but made no further contact with the plaintiff. On February 17, 1950, within the three-month protection period, without notice to plaintiff, and by dealing directly with the defendant, King bought the property.
Defendant refused plaintiff’s demand for commission and plaintiff commenced this action. The lower court decided plaintiff was entitled to compensation and joined Bardsley as an involuntary plaintiff. Judgment was then rendered against defendant and in favor of Bardsley for the use and benefit of the plaintiff. Defendant appeals.
Doubtless plaintiff rendered some measure of service resulting in Mr. King’s purchase of defendant’s property. It has long been established in this jurisdiction, however, that a broker or agent may recover only by virtue of contract and cannot recover upon the basis of quantum meruit. Watson v. Odell, 58 Utah 276, 198 P. 772, 20 A.L.R. 280; Case v. Ralph, 56 Utah 243, 188 P. 640. *372Hence, the first question raised by this appeal is whether, under Title 82, Chapter 2, U.C.A.1943, the agreement between plaintiff and defendant was valid and enforceable by plaintiff. We hold that it was not.
Section 82-2-1, U.C.A. 1943, made it unlawful for any person to engage in the business or assume to act as a real estate broker or a real estate salesman within the state of Utah without first complying with the statutory provisions. Section 82-2-2, then defined a “real estate broker” as including persons who for another and for a fee or consideration, “sells * * * or lists or offers or attempts or agrees to list” any real estate. This section expressly provided that a real estate broker shall have the right to fill out and complete such statutory or securities commission approved forms or legal documents needed to complete a transaction involving such realty. Section 82-2-3 defines a “real estate salesman” as any person employed or engaged by or on behalf of a licensed real estate broker for the purpose of accomplishing any act or transaction set out or comprehended by the definition of a real estate broker in Section 82-2-2 and Section 82-2-10 made it unlawful for any real estate salesman to accept a commission for the performance of any of the acts specified in Title 82, Chapter 2 from any person, except his employer, and provided that such employer must be a licensed real estate broker. The necessary implication of Section 82-2-10 — that a salesman may not sue anyone other than his employing broker for his commission — was expressly established as law in 1951 by a legislative addition to Title 82 which provided that any action to recover a fee or commission must be instituted and brought by the broker under whom the salesman is employed. (See Section 61-2-18, U.C.A. 1953.) This same provision prohibits any person or association from bringing an action for the recovery of any commission for any act done, which is prohibited under the provision of this act to other than licensed real estate brokers, unless such persons are duly licensed under such act as a real *373estate broker at the time such act or service was rendered. Such provision, while not applicable to transactions completed before its passage, is indicative of the legislative spirit and intent behind all of Title 82, Section 2 and particularly Section 82-2-10.
Under the facts, it is evident that plaintiff’s operation as an unlicensed broker was in contravention of public policy and statutory mandate. That such fact was within plaintiff’s knowledge is made manifest by his admission in open court that he could look only to a licensed broker for his commission and by his subsequent request to join Bardsley as an involuntary plaintiff in order to receive a judgment for his own use and benefit.
It is thus evident that the listing agreement between plaintiff and defendant was prohibited by statute; was invalid; and was unenforceable by plaintiff unless he could join Bardsley as an involuntary plaintiff under Rule 19(a), Utah Rules of Civil Procedure. Such is the second question raised by this appeal.
Rule 19(a), U.R.C.P. states that
“When a person who should join as a plaintiff refuses to do so, or his consent cannot be obtained, he may be made a defendant or, in proper cases, an involuntary plaintiff.”
Plaintiff contends that he was the real party in interest; that he had a just claim against defendant; that under Title 82, Chapter 2, U.C.A. 1943 he was prevented from bringing the action; that at the time the listing agreement was signed, he was licensed under Bardsley; that Bardsley’s presence before the court as a licensed broker was necessary in order for plaintiff to recover; and that joining Bardsley as involuntary plaintiff was therefore necessary and proper under the law. We do not agree.
It may well be that plaintiff is the real party in interest— providing any legal claim whatsoever exists against the *374defendant. We believe none does. The agreement between plaintiff and defendant was unauthorized by statute. Such agreement could only have been valid if executed for and in behalf of Bardsley as authorizing broker. It was not. Bardsley had no knowledge of such agreement; was not interested therein; and had no intention of becoming so. Similarly, neither plaintiff nor defendant intended Bardsley to have any relationship to or interest in the listing agreement. Bardsley had no interest in this contract whatsoever. Hence, plaintiff could receive no interest under such agreement from Bardsley and was prevented by statute from having an interest in his own right. Thus, at no time was there a claim against defendant which was enforceable by Bardsley, by plaintiff, or by plaintiff through Bardsley.
It is true that Rule 19 (a), U.R.C.P. states that a person or party may be joined as an involuntary plaintiff. Such person or party, however, must have some interest, affirmative or negative, which is beneficial or detrimental to the interest of the party desiring to so join the recalcitrant person. Bardsley had no such interest. He could bring no action against defendant based on the listing agreement since he was not a party thereto and had no assignment of interest therein. Similarly, defendant had no contractual cause of action against Bardsley since he made no agreement with Bardsley and none with plaintiff acting in Bardsley’s behalf. Rule 19(a) does not permit one having no relationship or interest whatsoever in the conflict between the warring parties, to be drawn into the fray merely because the real party in interest, — who is barred by statutory provision from prosecuting the action in his own name and right — , is in need of such person to circumvent legislative mandate.
The judgment of the lower court is reversed. Costs to appellant.
WOLFE, C. J., and CROCKETT and WADE, JJ., concur.