Sears
A customer shops for items in a Walgreens store June 4, 2003 in Niles, Illinois. Tim Boyle/Getty Images

Microsoft (NASDAQ:MSFT) has just signed a seven-year deal with Walgreens Boots Alliance (NASDAQ:WBA) that will venture to develop new healthcare-delivery models. Microsoft will become the strategic cloud provider of Walgreens, the second-largest pharmacy chain in the U.S. Walgreens "plans to migrate the majority of the company's IT (information technology) infrastructure onto Microsoft Azure," according to the press release.

This move comes as an increasing number of retailers are joining forces with Microsoft against their common rival.

A big deal

In addition to its adoption of Azure, Walgreens also plans to roll out Microsoft 365, which includes Office 365 and Windows 10, to more than 380,000 employees. The companies also will pilot 12 in-store "digital health corners," which will introduce customers to healthcare-related hardware and devices.

The pair also are embarking on a multi-year research-and-development collaboration to "build healthcare solutions, improve health outcomes and lower the cost of care." The partnership will focus on "enabling more personalized healthcare experiences from preventative self-care to chronic disease management." If things go according to plan, this will result in "new transformational platforms in retail, pharmacy, and business services."

The enemy of my enemy is my friend

A growing number of high-profile retailers are joining forces with Microsoft to take on Amazon (NASDAQ:AMZN).

Earlier this month, Kroger (NYSE:KR) the second-largest grocery retailer in the U.S., announced a partnership with Microsoft to create a futuristic grocery store. This project will include digital shelves that can deliver advertising to customers and adjust product prices and will be designed to help customers and employees navigate the stores. Customers who create their shopping lists in the Kroger app in advance of their visit will be guided around the store to the items on their lists.

This follows a five-year deal between Walmart (NYSE:WMT) and Microsoft in mid-2018, where Walmart chose to migrate a "significant portion" of both walmart.com and samsclub.com to Microsoft's Azure, "tapping into the full range of Microsoft's cloud solution." The package deal includes machine learning, artificial intelligence (AI), data-platform technologies, and access to Microsoft 365.

In an interview with CNBC, Microsoft CEO Satya Nadella said Walgreens needed a partner it could "trust in order to be able help them build this ecosystem," in a thinly veiled shot at Amazon.

A push into healthcare

Amazon has made a number of moves lately signaling its growing interest in the healthcare field, which may partly explain Walgreens' choice of technology partner.

Early last year, Amazon joined Berkshire Hathaway and JPMorgan Chase in an alliance to address the growing cost of healthcare. The entities formed an independent company "free from profit-making incentives and constraints" to provide the three companies and their employees with more cost-effective healthcare options.

Amazon also acquired online pharmacy start-up PillPack, a company providing pre-sorted medications and home delivery, in a deal valued at $1 billion. PillPack recently applied for a number of new pharmacy licenses that would allow it to ship from more facilities. This is leading to speculation that Amazon may begin offering the service to its employees or incorporate PillPack into a larger move targeting prescription drugs.

A growing trend

Microsoft's Azure has taken up a solid second place behind AWS and is growing faster than its industry-leading competitor. With a number of high-profile retail tie-ups in recent months, it's apparent that Microsoft is intent closing on the lead. The worldwide public cloud market offers a huge incentive, with a whopping $221 billion up for grabs.

The company also is using a time-honored strategy of pointing out to perspective retail partners that they don't have to compete with Microsoft the same way they do Amazon, highlighting the apparent conflict of interest.

Based on what we've seen recently, that strategy is working.

This article originally appeared in the Motley Fool.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Teresa Kersten, an employee of LinkedIn, a Microsoft subsidiary, is a member of The Motley Fool's board of directors. Danny Vena owns shares of Amazon. The Motley Fool owns shares of and recommends Amazon and Berkshire Hathaway (B shares). The Motley Fool owns shares of Microsoft. The Motley Fool has a disclosure policy.