(Josh Edelson/AFP/Getty Images)

Microsoft late Wednesday said it will warn consumers if it suspects governments are trying to hack into their accounts to access things, including Outlook email and the company's cloud-storage service OneDrive.

The company already informs users if it believes their Microsoft account has been targeted by a third party and provides guidance on how to keep those accounts safe. But now it will go further and tell them if it believes the attackers were "working on behalf of a nation state," according to a blog post from Scott Charney, Microsoft's vice president for trustworthy computing.

"We’re taking this additional step of specifically letting you know if we have evidence that the attacker may be 'state-sponsored' because it is likely that the attack could be more sophisticated or more sustained than attacks from cybercriminals and others," he wrote.

The shift follows in the footsteps of Google, which started warning users about potential nation state targeting in 2012. This year other companies, including Facebook, Twitter, and most recently Yahoo, also announced they were making such notifications.

Reuters reports Microsoft's announcement came nine days after the outlet asked why the tech giant hadn't informed victims of a hacking campaign targeting international leaders of China's Tibetan and Uighur minorities that was discovered in 2011. Two unnamed former employees said the company's own experts believed Chinese authorities were behind the attacks, but the company did not share that information with the attacked users, according to Reuters.

However, in a statement to Reuters, Microsoft said neither it nor the U.S. government could pinpoint the source of those attacks.