Getty Images

Attackers attempted to use a phony version of Microsoft's website to make phishing attacks on three 2018 congressional candidates.

The company found and stopped the cyberattack attempts, said Tom Burt, corporate vice president for customer security and trust at Microsoft, at the Aspen Security Forum in Colorado on Thursday. He declined to name the candidates, but said they were "all people who because of their positions might have been interesting from an espionage standpoint, as well as an election disruption standpoint."

Microsoft worked with the government to remove the domain and stop the attacks.

Attackers also tried to use a phony Microsoft site during the 2016 Democratic Convention in Philadelphia, Burt said.

In April, Microsoft launched its Defending Democracy Program, which aims to protect campaigns from hacking and increase online political ad transparency, among other things.