Microsoft (NASDAQ:MSFT) had a mixed second quarter based on last week's earnings report. Its revenue rose 12% annually to $32.5 billion, but that marked its slowest growth in four quarters and missed expectations by $40 million. However, its non-GAAP net income rose 14% to $8.6 billion, as its EPS rose 15% to $1.10 per share -- which beat estimates by a penny.

Microsoft expects its revenue to rise 10%-12% annually in the third quarter, which matches analysts' expectations. Analysts expect its earnings to rise 7%. Those forecasts indicate that Microsoft's growth is decelerating as its growth engines cool off.

Microsoft's strongest growth engine over the past year was its commercial cloud business, which generates most of its revenue from Office 365, Azure, and Dynamics CRM. However, several components of that engine posted softer growth during the second quarter.

Taking apart the engine

Microsoft's commercial cloud revenue rose 48% annually to $9 billion during the quarter and accounted for 31% of its top line. That represents a slight acceleration from its 47% growth in the first quarter, but remains below its 50%-plus growth rate in 2018.

Source: Microsoft quarterly reports. The Motley Fool

Microsoft doesn't disclose exactly how much revenue comes from each of its cloud services, it only reports year-over-year growth rates. Azure, its infrastructure cloud platform, remains the fastest-growing division -- but its growth clearly decelerated over the past year.

Year-over-year growth, constant currency. Source: Microsoft quarterly reports. The Motley Fool

Azure is still growing at a faster rate than its main competitor, Amazon (NASDAQ:AMZN) Web Services (AWS), which posted 45% sales growth last quarter. But Azure has a lower market share than AWS, so it could fall further behind if its growth peaks.

Microsoft isn't worried

Microsoft doesn't seem concerned about the year-over-year deceleration in Azure's growth. During the conference call, CEO Satya Nadella emphasized that Azure was the "core platform" that powers "everything" -- including Office 365 and Dynamics 365, the two other pillars of its commercial cloud business.

The growth of those two businesses also decelerated over the past year, although Dynamics' growth slightly accelerated during the second quarter on more "modular, extensible, and AI-driven" offerings for its customers according to Nadella.

Year-over-year growth, constant currency. Source: Microsoft quarterly reports. The Motley Fool

Simply put, Microsoft believes that it can keep leveraging the strength of Windows, Office, Dynamics, and its other products to tether more customers to Azure. Once they're locked in, Microsoft can cross-sell other services to boost its commercial cloud revenue.

Microsoft also holds another key advantage against Amazon. Brick-and-mortar retailers that were burned by Amazon are more likely to partner with Microsoft, since they don't want to support Amazon's highest margin business. That's why Microsoft recently added Walmart, Kroger, and Walgreens Boots Alliance to its growing list of retail partners.

A picture shows the French headquarters of American multinational technology company Microsoft in Issy-Les-Moulineaux, a Paris' suburb, Nov. 27, 2017. MARTIN BUREAU/AFP/Getty Images

Microsoft can lock in these customers by bundling together Azure, Office 365, Dynamics, and other services in cost-effective packages. Microsoft is also helping some of these partners build "smart retail" platforms to counter Amazon's growing brick-and-mortar presence.

Furthermore, CFO Amy Hood noted that a "significant improvement" in Azure's gross margin boosted the total gross margin of its commercial cloud business by five percentage points annually to 62% during the second quarter. This indicates that Azure's slowdown was likely caused by cyclically slower demand from enterprise customers, rather than a pricing war with AWS and other competitors.

Hood expects the commercial cloud business to remain "strong" in the third and fourth quarters, but warned that it could face "challenging" comparisons to the previous year. In other words, the cloud business will keep growing, but investors should expect lower growth rates.

No, Microsoft isn't losing its mojo

Microsoft's Azure business remains healthy, and it's probably the only cloud platform that scares Amazon. Amazon has a first-mover's advantage, but Microsoft can leverage its dominance of PC operating systems and productivity software, as well as growing retail resentment against Amazon, to remain the attractive alternative.

Azure's year-over-year growth will likely decelerate in the second half of 2019, but investors shouldn't panic. That growth should stabilize over the long term and enable Microsoft to lock more customers into its ever-expanding ecosystem.

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. Leo Sun owns shares of Amazon. The Motley Fool owns shares of and recommends Amazon. The Motley Fool owns shares of Microsoft. The Motley Fool has a disclosure policy.