Silicon Valley is settling in to get grilled by Washington.

Executives from Facebook (FB), Twitter (TWTR) and Google (GOOGL) testified before Congress Tuesday in the first of three hearings this week into how foreign nationals used social media to meddle in the 2016 presidential election.

At the hearing, held by the Senate Judiciary Subcommittee on Crime and Terrorism, the tech companies were pressed on their ability to prevent bad actors from taking advantage of their platforms through ads and regular posts.

"I'm trying to get us down from la la land here. The truth of the matter is you have 5 million advertisers that change every month, every minute, probably every second," Sen. John Kennedy, a Louisiana Republican, asked Colin Stretch, Facebook's general counsel. "You don't have the ability to know who every one of those advertisers is, do you?"

Stretch admitted Facebook had limitations on what it could know. "To your question about seeing essentially behind the platform, to understand if there are shell corporations, of course the answer is no," he said. "We cannot see behind the activity."

The heated exchange highlights the difficulties these online companies face in trying to monitor their massive audience of users and crack down on foreign election meddling and misinformation campaigns.

In prepared testimony for the first hearing, the tech companies revealed the sweeping scale of Russian influence operations on their platforms.

Facebook informed lawmakers that roughly 126 million Americans may have been exposed to content generated on its platform by a Russian government-linked troll farm known as the Internet Research Agency between June 2015 and August 2017.

Twitter disclosed that it has identified 2,752 accounts linked to the Internet Research Agency. It found a total of 36,746 accounts that appeared to be associated with Russia, though not necessarily with the Internet Research Agency, which generated automated, election-related content.

Related: Exclusive: Russian-bought Black Lives Matter ad on Facebook targeted Baltimore and Ferguson

Multiple Russian-boughts ads were displayed at the hearing, including a Facebook post from a page called Heart of Texas claiming Hillary Clinton had a 69% disapproval rate among veterans and another Facebook event called "Miners for Trump."

In one particularly tense moment, Senator Al Franken repeatedly pressed Stretch on how a sophisticated service like Facebook could possibly miss Russian actors buying these U.S. election ads "with rubles."

"There were signals we missed," Stretch said. He stopped short of saying Facebook would commit to stop running political ads in the U.S. paid for by foreign money.

In another exchange, the Twitter and Facebook officials admitted that other countries could take advantage of their platforms. When asked if either North Korea or Turkmenistan may have done so already, Stretch said Facebook was not aware of it.

"The bottom line is these platforms are being used by people who wish us harm and wish to undercut our way of life," Senator Lindsey Graham said.

The tech companies condemned the Russian activity and pledged to continue investigating it and cracking down where necessary.

"This type of activity creates not only a bad user experience, but also a distrust for the platform," said Sean Edgett, acting general counsel at Twitter. "So we are committed every single day to getting better at solving this problem."

The hearings and new disclosures cast a harsh spotlight on the immense power of the tech companies at a time when there is renewed interest in greater regulation for the industry.

"I'm very proud that the three companies you are presenting here today are American companies and I think you do enormous good, but your power sometimes scares me," Sen. Kennedy said at the hearing.

Related: 'Kill them all' -- Russian-linked Facebook accounts called for violence

This month, a bipartisan group of senators unveiled legislation called the Honest Ads Act to require new disclosures for political ads that appear online on sites like Facebook and Twitter.

Both Facebook and Twitter have preemptively promised greater transparency for political ads, but that may not be enough to appease legislators. Senator Mark Warner, the top-ranking Democrat on the Senate Intelligence Committee, suggested he would press the issue at one of the hearings scheduled for Wednesday.

"How do they plan to work with Congress to make sure this doesn't happen again?" Warner wrote on Twitter Tuesday. "Specifically on legislation like the #HonestAds Act."

But Warner and his colleagues won't be able to raise those concerns with tech CEOs at the hearings. The three companies will be represented by their general counsels at the hearings this week, and not any of their more well-known executives.