
546 S.E.2d 641 (2001)
Shelley Austin WOOD, Plaintiff,
v.
GUILFORD COUNTY, Burns International Security Services Corporation, f/k/a Borg-Warner Protective Services Corporation and Burns International Security Services, Defendants.
No. COA00-592.
Court of Appeals of North Carolina.
May 15, 2001.
*643 Fisher, Clinard & Craig, PLLC, by John O. Craig, III and Shane T. Stutts, High Point, for plaintiff-appellee.
Guilford County Attorney Jonathan V. Maxwell, by Assistant County Attorney Mercedes O. Chut, for defendant-appellant Guilford County.
Kilpatrick Stockton LLP, by James H. Kelly, Jr., Winston- Salem, for defendant-appellee Burns International Security Services Corporation.
GREENE, Judge.
Guilford County (Defendant) appeals an order dated 29 March 2000 (the Order) in favor of Shelley Austin Wood (Plaintiff) denying Defendant's Rule 12(b)(6) motion to dismiss the first, second, and fourth claims for relief of Plaintiff's complaint.
On 30 July 1999, Plaintiff filed a complaint against Defendant and Burns International Security (Burns), f/k/a Borg-Warner Protective Services Corporation and Burns International Security Services. Plaintiff's complaint alleges she was employed in the Office of the Clerk of Superior Court, Guilford County by the Administrative Office of the Courts (the AOC) at all times relevant to the complaint. Plaintiff was stationed in the Guilford County Courthouse located in High Point (the Courthouse). On 31 March 1998 at approximately 10:00 a.m., Plaintiff was attacked in a restroom located on the second floor of the Courthouse. "Plaintiff's assailant grabbed her by the shoulders, threw her to the floor, and repeatedly punched her about the face and head, demanding that she roll over on her back." Plaintiff's assailant was later convicted of attempted first-degree rape and assault with a deadly weapon inflicting serious injury.
As a result of her attack, Plaintiff alleges she: "suffered trauma to the left eye, severe facial bruising, a bruised coccyx, as well as great pain, terror and mental anguish"; "suffered from depression and sleeplessness"; "missed several weeks of work and lost wages"; and "incurred expenses for medical treatment and psychological counseling."
Defendant and Burns entered into a contract (the Contract) on 10 October 1996 for Burns to provide security to the Courthouse. Plaintiff alleges Defendant has waived its governmental immunity by requiring Burns to obtain a liability insurance policy and name Defendant as an additional insured in the insurance policy. Plaintiff alleges the following claims for relief: 1) Defendant breached its duty by failing to provide adequate security to the Courthouse (the first claim); 2) Burns breached its duty to provide adequate security to the Courthouse (the second *644 claim); 3) as a result of Defendant's willful and wanton conduct, Plaintiff was entitled to punitive damages (the third claim); and 4) Plaintiff, as an employee of the AOC stationed at the Courthouse, was "an intended third party beneficiary of the Contract" and Defendant and Burns "breached the Contract as well as their duty to ... Plaintiff as an intended third party beneficiary by failing to provide reasonable and adequate security" to the Courthouse (the fourth claim).
Defendant filed its answer to Plaintiff's complaint on 2 September 1999. In its answer, Defendant denied all of Plaintiff's claims for relief and specifically pleaded "the unavailability of punitive damages against a local government under North Carolina law ." Defendant also asserted: Plaintiff's complaint failed to state a claim against Defendant "upon which relief may be granted and the Complaint should be dismissed" with respect to Defendant pursuant to Rule 12(b)(6) of the North Carolina Rules of Civil Procedure; Defendant's governmental immunity as a complete bar to Plaintiff's action; and the public duty doctrine as a complete bar to Plaintiff's action.
The trial court, after reviewing the pleadings and hearing the arguments of Plaintiff and Defendant, granted Defendant's motion to dismiss the third claim.[1] The trial court, however, denied Defendant's motion to dismiss the first claim, the second claim, and the fourth claim. The trial court did not dismiss any of Plaintiff's claims against Burns.
The issues are whether: (I) a negligence action against a county is an action against the State and, thus, requires the action be brought before the North Carolina Industrial Commission; (II) Defendant was exercising its police powers in the operation of the Courthouse, and, thus, the public duty doctrine bars Plaintiff's claims against Defendant; (III) Defendant waived its governmental immunity by requiring Burns to purchase insurance and name Defendant as an additional insured; and (IV) the complaint sufficiently alleges the Contract was entered into for Plaintiff's direct benefit.

I
Defendant argues because the AOC "has the primary duty to protect its own employees," Plaintiff's claim against Defendant is a claim against an agent of the State, and, thus, the North Carolina Industrial Commission has exclusive subject matter jurisdiction. We disagree.
The North Carolina Industrial Commission has jurisdiction to hear and pass upon tort claims against "departments, institutions, and agencies of the State" arising from "the negligence of any officer, employee, involuntary servant or agent of the State while acting within the scope of his office, employment, service, agency or authority." N.C.G.S. § 143-291(a) (1999). The Tort Claims Act, however, "applies only to actions against state departments, institutions, and agencies and does not apply to claims against... agents of the State." Meyer v. Walls, 347 N.C. 97, 107, 489 S.E.2d 880, 885-86 (1997). Consequently, the Tort Claims Act does not apply to county agencies, regardless of whether the county agencies are acting as an agent of the State. Id. at 108, 489 S.E.2d at 886.
In this case, Plaintiff brought suit against Defendant, a county. Plaintiff did not bring suit against any agency of the State and, thus, it is immaterial whether Defendant is an agent of the AOC. As such, the Tort Claims Act does not apply to Plaintiff's claim against Defendant. Accordingly, the trial court had subject matter jurisdiction over Plaintiff's claims against Defendant.[2]


*645 II
Defendant next argues the trial court erred in failing to dismiss Plaintiff's claims because Plaintiff's claims are barred by the public duty doctrine. We disagree.
"A motion to dismiss for failure to state a claim upon which relief may be granted under [N.C. Gen.Stat. § 1A-1, Rule 12(b)(6) ] is addressed to whether the facts alleged in the complaint, when viewed in the light most favorable to the plaintiff[ ], give rise to a claim for relief on any theory." Ford v. Peaches Entertainment Corp., 83 N.C.App. 155, 156, 349 S.E.2d 82, 83 (1986), disc. review denied, 318 N.C. 694, 351 S.E.2d 746 (1987).
Generally, a municipality and its agents "act[ ] for the benefit of the general public when exercising [their] police powers, and therefore cannot be held liable for negligence or gross negligence" in failing to furnish police protection to specific individuals. Vanasek v. Duke Power Co., 132 N.C.App. 335, 337, 511 S.E.2d 41, 43, cert. denied, 350 N.C. 851, 539 S.E.2d 13 (1999). The public duty doctrine, as it applies to local government, is limited to "law enforcement departments when they are exercising their general duty to protect the public." Lovelace v. City of Shelby, 351 N.C. 458, 461, 526 S.E.2d 652, 654 (2000); see Thompson v. Waters, 351 N.C. 462, 465, 526 S.E.2d 650, 652 (2000).
In this case, viewing Plaintiff's allegations in the light most favorable to Plaintiff, Defendant is not protected by the public duty doctrine. Defendant, as a local government, was not acting in a law enforcement capacity or exercising its general duty to protect the public by providing security to the Courthouse, but was acting as owner and operator of the Courthouse. Defendant was statutorily required to provide "courtrooms, office space, ... and related judicial facilities." N.C.G.S. § 7A-302 (1999) ("each county in which a district court has been established" is required to provide "courtrooms, office space, ... and related judicial facilities"). In this capacity, Defendant was not acting to provide police protection to the general public, and, thus, the public duty doctrine is not applicable. Accordingly, the trial court did not err in failing to dismiss Plaintiff's claims due to the public duty doctrine.

III
Defendant next argues that "the common law doctrine of sovereign immunity provides" a basis for the dismissal of Plaintiff's claims. We disagree.
The doctrine of sovereign immunity provides counties and its officials with immunity from suits against them in their official capacity. Messick v. Catawba County, 110 N.C.App. 707, 714, 431 S.E.2d 489, 493, disc. review denied, 334 N.C. 621, 435 S.E.2d 336 (1993). A county, however, "may contract to insure itself and any of its officers, agents, or employees against liability" for torts. N.C.G.S. § 153A-435(a) (1999). The "[p]urchase of insurance pursuant to [section 153A-435(a) ] waives the county's governmental immunity, to the extent of insurance coverage." Id. "Purchase" means to acquire, buy, obtain, procure or secure. Burton's Legal Thesaurus 440 (3d ed.1998). If a plaintiff fails to allege a waiver of immunity by the purchase of insurance in her complaint, the plaintiff has failed to state a claim against the county. Mullins v. Friend, 116 N.C.App. 676, 681, 449 S.E.2d 227, 230 (1994).
In this case, viewing Plaintiff's allegations in the light most favorable to Plaintiff, Defendant waived its governmental immunity. Plaintiff alleges Defendant entered into the Contract with Burns requiring Burns to obtain a liability insurance policy and name Defendant as an additional insured. Although Defendant did not "purchase" a liability insurance policy from an insurance company, we do not read section 153A-435(a) as requiring the purchase of insurance from an insurance company in order to waive governmental immunity. By requiring Burns to obtain an insurance policy and name Defendant as an additional insured, *646 Defendant contracted, within the meaning of section 153A 435(a), to have itself insured and, thus, waived its governmental immunity.[3] Accordingly, the trial court did not err in denying Defendant's motion to dismiss Plaintiff's complaint based on governmental immunity.

IV
Defendant finally argues the trial court erred in failing to dismiss Plaintiff's fourth claim because Plaintiff was not an intended beneficiary of the Contract. We agree.
A plaintiff who alleges a claim based on third party beneficiary contract doctrine must establish in her complaint: "(1) the existence of a contract between two other persons; (2) that the contract was valid and enforceable; and (3) that the contract was entered into for [her] direct, and not incidental, benefit." Leasing Corp. v. Miller, 45 N.C.App. 400, 405-06, 263 S.E.2d 313, 317, disc. review denied, 300 N.C. 374, 267 S.E.2d 685 (1980). As to the third element, an allegation in a complaint that a plaintiff is "a member of a class of persons `intended' by the contracting parties to be benefi[t]ted falls far short of alleging that the contract was entered into for the direct, not incidental, benefit of [the] plaintiff." Hoots v. Pryor, 106 N.C.App. 397, 409, 417 S.E.2d 269, 277, disc. review denied, 332 N.C. 345, 421 S.E.2d 148 (1992). It is not enough that the contract benefits the plaintiff "`if in fact it was not intended for [her] direct benefit.'" Snyder v. Freeman, 300 N.C. 204, 220, 266 S.E.2d 593, 603-04 (1980) (citation omitted). A complaint failing to allege any of the required elements of the third party beneficiary doctrine is subject to dismissal under Rule 12(b)(6). Hoots, 106 N.C.App. at 408, 417 S.E.2d at 276.
In this case, Plaintiff's complaint fails to allege the Contract was entered into for her direct benefit. Plaintiff alleges nothing more than as an employee of the AOC and a user of the Courthouse, the parties intended to benefit Plaintiff. The Contract provides that it is entered into for the security of the Courthouse. It does not evidence the parties' intention, other than incidental, to provide a benefit to Plaintiff or other users of the Courthouse. Accordingly, the trial court erred in failing to dismiss the fourth claim for failure to state a claim upon which relief can be granted.
In summary, the trial court: has subject matter jurisdiction over Plaintiff's claims against Defendant; did not err in failing to dismiss Plaintiff's negligence claim against Defendant based on the public duty doctrine or governmental immunity; and did err in failing to dismiss Plaintiff's claim to enforce the Contract based on the third party beneficiary doctrine.
Affirmed in part, and reversed in part.
Judges McGEE and CAMPBELL concur.
NOTES
[1]  We note Plaintiff did not appeal the trial court's dismissal of the third claim.
[2]  In its brief to this Court, Defendant relies on Vaughn v. N.C. Dept. of Human Resources, 296 N.C. 683, 252 S.E.2d 792 (1979) to support its argument that Defendant is an agent of the State and, thus, the Tort Claims Act applies. In Vaughn, the plaintiff sued the Department of Human Resources, which was a State agency, alleging the Durham County DSS was acting as an agent of the Department of Human Resources. Vaughn, 296 N.C. at 684, 252 S.E.2d at 793-94. Vaughn, while determining that a county agency was an agent of the State, did not hold the county agency could be sued under the Tort Claims Act. Meyer, 347 N.C. at 108, 489 S.E.2d at 886 (affirmatively overruling any cases holding a county agency is a state agency subject to suit under the Tort Claims Act).
[3]  We note in Cross v. Residential Support Services, this Court held "[a]ssuming arguendo that the Area Authority's requirement, in the contract, that [a service provider] purchase insurance, is a waiver of immunity by the Authority ..., it does not necessarily follow that the County has thereby waived immunity." Cross v. Residential Support Services, 123 N.C.App. 616, 619, 473 S.E.2d 676, 678 (1996), remanded on other grounds, 345 N.C. 341, 483 S.E.2d 164 (1997). In Cross, it was "the Area Authority, not the County, that [was] indemnified by a decision to purchase insurance." Id. Thus, Cross left unanswered the question, now present in the case sub judice, of whether a county requiring a service provider to purchase insurance waives the county's governmental immunity.
