Chemistry replaces EHS Brann, the incumbent, with the full handover of the business expected to be completed later this month.
The agency will work across all Microsoft divisions except the Xbox business, which is handled by Agency Republic.
The work will involve direct marketing and sales promotion, as well as consultancy on building and exploiting the massive Microsoft customer database.
Nick Barley, the director of marketing at Microsoft, said the company chose Chemistry because it wanted "a new and broader skill that went beyond direct marketing".
Joe Garton, the Chemistry chief executive, added: "An appointment like this is heartening because it goes beyond direct marketing and digital, showing that CRM is more than just using IT software - it involves the use of marketing communications."
Last week, Chemistry acquired Made With Love, a brand response agency, for an undisclosed sum. MWL has clients such as Lever Faberge, with previous campaigns including the Persil poster ad in 2000, which featured Naomi Campbell in silver gloves.