Microsoft said late Tuesday that it took action in recent weeks to mitigate China-based cyberattacks that exposed email account information of government agencies and other organizations, along with customer accounts of people tied to those agencies and organizations.