Microsoft contributed the code under "GPLv2 or later", despite samba being under GPLv3.
GPLv2 does not contain the explicit patent grant that are part of why GPLv3 was created. And I very much doubt the courts will consider "or later" to include the patent grant.
The code in question seems very peripheral (something about using Firefox for configuration), and have received zero comments on the developers list. I would be very surprised if Microsoft had any other motivation for the release, than to make the engineer who worked on it happy.
However, it is probably not an accident that they choose the version of the GPL without a patent grant.