Microsoft Corp. (MSFT - Get Report) shares were on the rise Tuesday on the heels of a major deal with Walgreens Boots Alliance (WBA - Get Report) that will explore new ways of delivering health care while also handing the tech giant hundreds of thousands of new users.

Walgreens will move "the majority of the company's IT infrastructure" onto Microsoft Azure while also rolling out Microsoft 365 to the retailer's 380,000 employees around the world, according to a press release by Walgreens.

Microsoft rose 2.90%, to close at $105.01, while Walgreens was up 1.61%, to $71.79.

The deal includes a multi-year research and development pact "to build health care solutions, improve health outcomes and lower the cost of care," Walgreens said.

The two companies plan to build "joint innovation centers" in key markets, while Walgreens will try out on a pilot basis 12 in-store "digital health corners" designed to show off and sell "select health care-related hardware and devices."

Walgreens is teaming up with Microsoft as it faces potential competition from online retail giant Amazon, which recently announced its own health care market venture with J.P. Morgan and Berkshire Hathaway.

"Our strategic partnership with Microsoft demonstrates our strong commitment to creating integrated, next-generation, digitally enabled health care delivery solutions for our customers, transforming our stores into modern neighborhood health destinations and expanding customer offerings," said Stefano Pessina, executive vice chairman and chief executive officer of WBA, in a press release.