Like the other recent victims, it added that there was no evidence of customer data being taken.

Spokesman Matt Thomlinson said the company waited until its initial investigation was over to reveal the attack but that there was "no surprise" Microsoft was targeted.

He said: "During our investigation, we found a small number of computers, including some in our Mac business unit, that were infected by malicious software using techniques similar to those documented by other organisations.

"We have no evidence of customer data being affected and our investigation is ongoing."

Like Facebook, Microsoft says it is still investigating how malicious software was planted on what it said were a small number of its computers.