It said a Russian group nicknamed "Fancy Bear" and North Korean groups dubbed "Zinc" and "Cerium" were implicated in recent cyber-attacks.
The UK's National Cyber Security Centre (NCSC) has previously said Russian hackers were targeting vaccine research.
But Russia denied it was responsible.
Microsoft, which develops cyber-security software, said it had detected attempts to break into the computer systems of seven pharmaceutical companies.
Vaccine researchers in Canada, France, India, South Korea, and the United States were also targeted.
Microsoft said the Russian group had used "brute force" tactics, trying to log in to accounts using millions of different passwords.
One of the North Korean groups sent emails posing as World Health Organization officials and tried to trick people into handing over their login credentials.
Some of the break-in attempts failed, but Microsoft warned that some of them had been successful.
Russia has previously denied targeting vaccine research. The Russian embassy in Washington, USA told news agency Reuters it had nothing further to add.
North Korea's representative to the United Nations has not yet responded to messages seeking comment.
What do you think?