
463 N.W.2d 773 (1990)
Andy MYERS and Amy Myers Through Their Parents, Greg MYERS and Jane Myers, Appellants,
v.
Thomas PRICE, et al., Respondents.
No. C1-90-1434.
Court of Appeals of Minnesota.
December 4, 1990.
Review Denied February 4, 1991.
*774 Marc G. Kurzman, Kurzman, Grant & Ojala, Minneapolis, for appellants.
William M. Hart, Meagher & Geer, Minneapolis, for respondents.
Considered and decided by SHORT, P.J., and LANSING and GARDEBRING, JJ.

OPINION
SHORT, Judge.
This tort action arises from an investigation conducted by Scott County officials in 1983 and 1984. On appeal from a grant of summary judgment against claims of malpractice and intentional infliction of emotional distress, two children of Greg and Jane Myers argue (1) respondents are not immune from liability because of a court appointment; and (2) dismissal of the Myers' federal case does not bar litigation of their state law claims. We disagree and affirm.

FACTS
Beginning in September of 1983, several children in Scott County alleged they had been sexually abused by a number of different adults. During the course of the investigation, 24 individuals, including Greg and Jane Myers, were criminally charged with sexually abusing children. See In re Scott County Master Docket, 618 F.Supp. 1534, 1543 (D.Minn.1985) (hereinafter Master Docket), aff'd in part and rev'd in part, Myers v. Morris, 810 F.2d 1437 (8th Cir.1987), cert. denied, 484 U.S. 828, 108 S.Ct. 97, 98 L.Ed.2d 58 (1987). Based upon allegations by several children, Scott County officials arrested Greg and Jane Myers and removed their children from the home.
The Scott County Family Court promptly held a juvenile protection hearing with regard to the Myers' children. The family court found probable cause to believe return of the Myers' children to their parents would endanger the children's welfare. The court ordered:
That the three [Myers] children shall be evaluated by Tom Price to determine their counseling needs or issues that need to be addressed as scheduled by Scott County Human Services.
Respondent Thomas Price is a social worker and therapist associated with Phipps-Yonas & Price, P.A. (the "clinic"). Pursuant to the court's order, Price actively questioned the Myers' children, both to determine if abuse had occurred and to assess their counseling needs. He reported his opinions to the family court and to law enforcement personnel.
After a jury acquitted two of the defendants in the child abuse proceedings, the Scott County attorney dismissed the charges against the Myers and 19 other defendants. The Myers, individually and on behalf of their children, immediately commenced an action in United States District Court against Price, his clinic, and a *775 host of others.[1] The federal district court granted summary judgment to Price and the clinic, holding they were protected by quasi-judicial immunity as a result of the family court's appointment. Master Docket, 618 F.Supp. at 1574 & n. 36, 1575. The Eighth Circuit Court of Appeals affirmed and the United States Supreme Court denied certiorari. Myers v. Morris, 810 F.2d 1437, 1470 (8th Cir.1987), cert. denied, 484 U.S. 828, 108 S.Ct. 97, 98 L.Ed.2d 58 (1987). This lawsuit was then commenced in Hennepin County District Court, alleging professional malpractice against Price, the clinic, and Susan Phipps-Yonas, and intentional infliction of emotional distress against Price alone. The trial court granted respondents' motion for summary judgment on the grounds of quasi-judicial immunity and res judicata.

ISSUES
I. Are the acts of a court-appointed therapist protected by quasi-judicial immunity?
II. Are the acts of a psychologist associated with a court-appointed therapist protected by quasi-judicial immunity?
III. Does the doctrine of res judicata bar a second lawsuit containing new legal theories if the underlying factual background is the same as the first case?

ANALYSIS
In reviewing an entry of summary judgment, this court must determine (1) whether there are any genuine issues of material fact, and (2) whether the trial court erred in its application of the law. Betlach v. Wayzata Condominium, 281 N.W.2d 328, 330 (Minn.1979); see Minn.R. Civ.P. 56.03. Because no genuine issues of material fact exist, we need only decide whether the trial court properly applied the law to the facts of this case. We will affirm the judgment if it can be sustained on any grounds. See Brecht v. Schramm, 266 N.W.2d 514, 520 (Minn.1978); Northway v. Whiting, 436 N.W.2d 796, 798 (Minn.App.1989).

I.
A judge or judicial officer cannot be held liable to anyone in a civil action for "acts done in the exercise of judicial authority." Linder v. Foster, 209 Minn. 43, 45, 295 N.W. 299, 300 (1940) (quoting Stewart v. Cooley, 23 Minn. 347, 350 (1877)); Sloper v. Dodge, 426 N.W.2d 478, 479 (Minn.App.1988); see also Restatement (Second) of Torts § 895D(2) (1979). Judicial immunity applies to determinations and acts in a judicial capacity "however erroneous or by whatever motives prompted." Linder, 209 Minn. at 46, 295 N.W. at 300 (quoting Stewart v. Case, 53 Minn. 62, 66, 54 N.W. 938, 938 (1893)). It extends to all classes of courts, from the highest judge of the nation to "the lowest officer who sits as a court and tries petty cases." Hoppe v. Klapperich, 224 Minn. 224, 234, 28 N.W.2d 780, 788 (1947). The rationale for this broad application of immunity is to preserve judicial independence by allowing judges to act in their official capacity without fear of retaliatory civil suits. Linder, 209 Minn. at 47, 295 N.W. at 301 (quoting Yaselli v. Goff, 12 F.2d 396, 399 (2d Cir. 1926), aff'd, 275 U.S. 503, 48 S.Ct. 155, 72 L.Ed. 395 (1927)).
Because judicial immunity is designed to protect the judicial process, it also extends to persons who are integral parts of that process. Briscoe v. LaHue, 460 U.S. 325, 335, 103 S.Ct. 1108, 1115-16, 75 L.Ed.2d 96 (1983); Sloper, 426 N.W.2d at 479. Courts have extended this "quasi-judicial" immunity to "court-appointed psychiatrists and physicians who prepare and submit medical evaluations relating to judicial proceedings." Sloper, 426 N.W.2d at 479. Significantly, quasi-judicial immunity was extended to Price and other therapists for their evaluation of children in the Scott County child abuse proceedings. Master *776 Docket, 618 F.Supp. at 1575; Myers, 810 F.2d at 1467.
The only difference between the federal litigation and this proceeding is the specific relief claimed. A new legal theory does not remove the shield of quasi-judicial immunity where the activities complained of remain the same. There is no evidence Price or anyone associated with him acted beyond the scope of his court appointment. Cf. Turner v. American Bar Ass'n, 407 F.Supp. 451, 482 (S.D.Ala., N.D.Ind., D.Minn., W.D.Pa., N.D.Tex., and W.D.Wis. 1975) (quasi-judicial immunity "extends only to those acts committed within the scope of the actor's jurisdiction and with the authorization of law"), aff'd Taylor v. Montgomery, 539 F.2d 715 (7th Cir.1976), aff'd Pilla v. American Bar Ass'n, 542 F.2d 56, 59 (8th Cir.1976). The Myers' claims against Price and the clinic, therefore, fail on the grounds of quasi-judicial immunity.

II.
Susan Phipps-Yonas is a psychologist associated with Price in Phipps-Yonas & Price, P.A. The Myers allege Phipps-Yonas committed professional malpractice by failing to supervise Price and by violating various statutory and regulatory duties.[2] However, Phipps-Yonas' liability is entirely dependent upon the conduct of Price in his role as a court-appointed official. Had there been no court appointment, she would have no duties with respect to the Myers' children. Because there is no allegation or evidence that Phipps-Yonas acted beyond the scope of the court appointment, the trial court did not err by extending quasi-judicial immunity to Phipps-Yonas. See Linder, 209 Minn. at 48, 295 N.W. at 300-01; Sloper, 426 N.W.2d at 479. In view of our holding, we need not address whether the malpractice claim against Susan Phipps-Yonas should have been dismissed because of Myers' failure to comply with Minn.Stat. § 145.682 (1988) (affidavit of expert review required in malpractice actions when expert testimony is necessary to establish a prima facie case).

III.
The doctrine of res judicata, or claim preclusion, is designed to prevent the relitigation of causes of actions already determined in a prior action, so a party may not be "twice vexed for the same cause." Beutz v. A.O. Smith Harvestore Prods., Inc., 431 N.W.2d 528, 531 (Minn. 1988) (quoting Shimp v. Sederstrom, 305 Minn. 267, 270, 233 N.W.2d 292, 294 (1975)). Litigation of a claim may be barred under the following rule:
A judgment on the merits constitutes an absolute bar to a second suit for the same cause of action, and is conclusive between parties and privities, not only as to every matter which was actually litigated, but also as to every matter which might have been litigated, therein.
Id. (quoting The Youngstown Mines Corp. v. Prout, 266 Minn. 450, 466, 124 N.W.2d 328, 340 (1963)). There are three components of res judicata: (1) a final judgment on the merits; (2) a second suit involving the same cause of action; and (3) identical parties or parties in privity. Sunrise Elec., Inc. v. Zachman Homes, Inc., 425 N.W.2d 848, 851 (Minn.App.1988) (citing Minneapolis Auto Parts Co. v. City of Minneapolis, 739 F.2d 408, 409 (8th Cir.1984)).
The first and third elements of this test are easily satisfied. The same plaintiffs sued Price and the clinic in federal court. The United States District Court granted summary judgment against the Myers based on quasi-judicial immunity. Master Docket, 618 F.Supp. 1534, 1575 (D.Minn. 1985). The Eighth Circuit affirmed this ruling and the United States Supreme Court denied certiorari. Myers, 810 F.2d at 1470, cert. denied, 484 U.S. 828, 108 S.Ct. 97, 98 L.Ed.2d 58 (1987).
*777 The second element of res judicata is also satisfied. Two causes of action are the same when they involve the same set of factual circumstances or when the same evidence will sustain both actions. Beutz, 431 N.W.2d at 533; see also Anderson v. Werner Continental, Inc., 363 N.W.2d 332, 335 (Minn.App.1985) (claims are identical "if the same operative nucleus of facts is alleged in support of the claims"), pet. for rev. denied (Minn. June 24, 1985). The Myers' two lawsuits arose from the same set of factual circumstances. Both actions stem from a court order directing Price to evaluate the Myers' children. The only difference between the state and federal actions is the claimed theory of recovery. Res judicata bars new grounds for relief based upon the same cause of action even if not presented in the first case. Melady-Briggs Cattle Corp. v. Drovers State Bank, 213 Minn. 304, 308-09, 6 N.W.2d 454, 456 (1942); Anderson, 363 N.W.2d at 334; Bifulk v. Evans, 353 N.W.2d 258, 260 (Minn.App.1984). Accordingly, the trial court did not err by granting summary judgment in favor of Price and the clinic on the ground of res judicata.

DECISION
Price, the clinic, and Phipps-Yonas are protected by quasi-judicial immunity. Moreover, the doctrine of res judicata prevents the Myers from bringing this second action against Price and the clinic. Respondents were entitled to judgment as a matter of law.
Affirmed.
NOTES
[1]  The Myers did not name psychologist Susan Phipps-Yonas as an individual defendant in the federal action.
[2]  The Myers claim Phipps-Yonas violated Minn. Stat. § 245.69, subd. 2 (1982) (rules and procedures for mental health clinics), and 12 Minn. Code Agency R. §§ 2.0291-2.0298, 7 Minn.Admin.Reg. 1858 (1983) (recodified as amended at Minn.R. 9520.XXXX-XXXX.0870) (standards for mental health centers and clinics).
