Microsoft's first laptop, the Surface Book. Photo: Microsoft

Microsoft (MSFT 1.65%) shares are trading near a 15-year high. The Redmond tech giant posted strong quarterly results last month, and its latest operating system, Windows 10, has enjoyed a robust rate of adoption. Its search engine, Bing, is finally profitable, and demand for its enterprise cloud services remains strong.

Still, Microsoft could be headed for a downturn. Although a general market rally could always buoy the stock, shareholders are unlikely to welcome the following scenarios.

Office could lose out to a cheaper competitor
Office is one of Microsoft's most important businesses. It generates the bulk of Microsoft's productivity and business processes revenue, a segment that brought in almost 30% of Microsoft's revenue last quarter. 18.2 million consumers subscribe to Office 365, Microsoft's subscription-based Office service, and commercial Office 365 has around 60 million monthly active users.

But Office faces competition, most notably from Alphabet's (GOOG 1.25%) (GOOGL 1.27%) Google Apps. Google Apps doesn't offer the same capabilities as Office, but it's less expensive. Microsoft charges $8.25 per user per month for entry-level Office 365 -- Alphabet charges $5 per user per month.

In October, Alphabet became more aggressive, targeting Microsoft customers explicitly. Office 365 is generally sold to businesses in the form of year-long commitments, making a switch to Google Apps costly. But now, businesses that are tied to such a contract can use Google Apps for free until their contract with Microsoft expires. Fortunately for Microsoft shareholders, the search giant has done little to dent the Office business -- but it continues to pose a threat.

Microsoft could miss its lofty cloud goals
Office 365, Dynamics CRM, and Azure collectively compose Microsoft's commercial cloud business. This business has attracted shareholders, including the hedge fund ValueAct, which argue that the true long-term value of Microsoft's business lies in its ability to eventually dominate cloud computing. Microsoft's commercial cloud has enjoyed strong growth in recent quarters, and is currently on pace to generate around $8.2 billion annually.

Microsoft's management, however, isn't satisfied, and has repeatedly guided for a much higher figure -- $20 billion. Microsoft hopes to hit that number by its fiscal year 2018 -- about two years from now. Microsoft's commercial cloud annualized revenue run rate rose about 70% last quarter on an annual basis. If that rate of grow continues, Microsoft should be able to hit that target. But if its commercial cloud growth slows, it could be forced to cut its guidance, and investors betting on Microsoft's cloud could defect.

Windows could lose share to other operating systems
Microsoft isn't dependent on Windows, but it remains a large portion of its business. It's the reason its search engine, Bing, is profitable, and it generates a significant portion of Microsoft's revenue. Microsoft's More Personal Computing segment is its largest -- it generated more than 40% of Microsoft's adjusted revenue last quarter -- and Windows represents the bulk of that segment.

Among traditional PCs, Windows remains dominant, and it's hard to imagine that dominance fading overnight. Still, the Windows platform faces challenges. Pew Research has found that a growing number of Americans are going without traditional PCs entirely, relying on their smartphone for almost all of their computing needs. 7% of Americans are now fully smartphone dependent, while 15% are mostly smartphone dependent. At the same time, the popularity of the Mac has been rising steadily since 2006, and in the U.S., its market share may be as much as 25%. IBM has begun deploying Macs in greater numbers, and the forthcoming iPad Pro could provide a strong alternative to Windows laptops among business users.

Alphabet's Chrome OS initiative has been particularly successful in some markets, such as schools, were Chromebooks are selling just as well as Windows PCs. And next year, Alphabet will introduce a version of Android designed for traditional PCs, according a recent report from Re/code.

Now installed on more than 110 million machines, the Windows 10 roll out has been extremely successful. Yet the Windows business remains challenged. If other operating systems supplant Windows in the years ahead, Microsoft could struggle.