What is a TXT record with the form ms=msXXXXXXXX used for?

Solution 1:

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.

Solution 2:

This signifies that the domain is an Office 365 tenant.