I expect that you could possibly find a group of military engineers that were attacked and somebody used a chainsaw to defend themselves. But this would have been a weapon of opportunity. It would not be intended as a weapon.
Chainsaws make poor weapons. While they cause a lot of damage to the enemy, they suffer many problems as weapons.
They are poorly balanced for fighting and very heavy.
They require fuel or power to operate.
They are noisy.
A mistake can severely damage the wielder.
Parrying with it can cause chain failure.
Chain failure can injure the wielder.
Most failures make the chainsaw ineffective as a weapon.
They are only effective in melee fighting.
Most modern soldiers rarely get into hand-to-hand fighting. When they do, they usually use a knife or bayonet. With all of the gear they need to carry, carrying a 10-15 pound chainsaw, plus a case to keep it from getting fouled, plus protective gear, plus extra fuel, plus maintenance tools is a poor use of weight.