Hackers with ties to Russia, China, and Iran are trying to spy on people linked to US President Donald Trump and Democratic presidential candidate Joe Biden, Microsoft said.

Tom Burt, Microsoft's vice president of customer security, said in a statement that the team accused of hacking Hillary Clinton's 2016 campaign emails is a Russian military intelligence unit. Over the past year, it has tried to hack the accounts of political consultants serving both Republicans and Democrats, as well as human rights organizations and think tanks.

Burt also spoke about the Chinese hackers trying to spy on people closely associated with American presidential campaigns and candidates, including one of Biden's advisers whose personal email was hacked, as well as at least one well-known person with past ties to the Trump administration.

He also announced attempts by Iranian hackers to hack the accounts of representatives of the Trump administration and members of the campaign headquarters.