President Donald Trump announced that the U.S. has issued new sanctions on Iran's central bank at the "highest level" while speaking in the Oval Office on September 20, 2019 in Washington, DC.

A hacking operation apparently linked to the Iranian government unsuccessfully targeted President Donald Trump's 2020 reelection campaign, a source confirmed to CNBC on Friday. Reuters first reported the incident, citing two sources familiar with the operation.

Trump campaign spokesman Tim Murtaugh told CNBC: "We have no indication that any of our campaign infrastructure was targeted."

Earlier Friday, Microsoft announced that it had seen "significant cyberactivity" from a hacking group apparently sourced to Iran and linked to that country's government.

Microsoft did not immediately respond to CNBC's request to confirm that the hacking group targeted the Trump campaign.

The U.S. has traditionally been targeted by Iran in times of conflict, particularly when the federal government imposes new sanctions on it. The Trump administration had been threatening new sanctions against Iran throughout the summer and imposed new sanctions on Sept. 4 against the country's shipping network and on Sept. 20 against Iran's central bank.

While the specific group within Iran responsible for the alleged attack hasn't been named, several cybersecurity research firms, including FireEye, have outlined the extensive intelligence and disruption capabilities of the Iranian government. These have included long-term campaigns against government agencies, media outlets, telecommunications firms and the hospitality industry.

— CNBC's Brian Schwartz contributed to this report.