Washington D.C. (CNN Business) A Facebook executive who attended Supreme Court nominee Bret Kavanaugh's Senate confirmation hearing said it was wrong of him not to tell company leaders he planned to to attend, according to two people familiar with an internal company town hall held Friday.

Joel Kaplan, Facebook's VP of global public policy, is a personal friend of Kavanaugh's, and they worked together during the last George W. Bush administration. Kaplan sat behind Kavanaugh, among the judge's family and friends, throughout Kavanaugh's appearance before the Senate Judiciary Committee last Thursday.

In a Facebook town hall organized to address staffers' concerns about Kaplan's attendance , CEO Mark Zuckerberg and his No. 2, Sheryl Sandberg, "expressed frustration that Joel inserted the company into a political moment by supporting his friend -- especially given his role at the company," according to one of the people familiar with the meeting.

The other person, who watched the event, which was streamed for employees, told CNN that "people were emotional" and that Kaplan "acknowledged he erred by not telling Mark and Sheryl."

Facebook's VP of Public Policy Joel Kaplan (wearing a blue tie) sat near Supreme Court nominee Brett Kavanaugh's friends and family at last week's Senate confirmation hearing.

One source stressed that Kaplan did not say it was a mistake to attend the hearing, but instead talked about his values of loyalty and friendship. Zuckerberg and Sandberg said at the town hall that it was important for Facebook to be "a place where diverse points of view are not only tolerated but supported."

Read More