I've noticed that some domains have a TXT record with the form
ms=msXXXXXXXX, where each
X is decimal digit.
What is this kind of TXT record used for?
They are usually used by automated validation procedures whose purpose is to detect wheter you are the rightful owner of a domain; they will ask you to create a TXT record with a specific text string in the domain DNS zone, and then check if the requested record is actually there; if you were able to create it, it's safe to assume you own (or at least manage) that domain.
A record in the form
ms=msXXXXXXXX is typical of the procedure used for domain validation by Microsoft Office 365.
This signifies that the domain is an Office 365 tenant.