Microsoft (MSFT 0.37%) has been a fantastic stock to own over the last 12 months.

Shares of the Windows-maker are up better than 23% since last May -- almost twice as good as the S&P 500. Despite facing challenges to its legacy businesses, Microsoft has been able to deliver a stream of solid earnings reports.

Microsoft shares are now trading near a level that hasn't been seen since the dot com bubble. Is the stock due for a correction? While there are plenty of reasons to be optimistic about Microsoft's business, things could be about take a turn for the worse. Below are three scenarios that, if they came to pass, would likely harm Microsoft shareholders.

Cloud growth slows
Most optimistic Microsoft bulls don't concern themselves with Windows, or the traditional PC in general. Rather, they see potential for Microsoft in its cloud computing business.

When hedge fund ValueAct first disclosed its $1.9 billion stake in the firm two years ago, its CEO declared that "In three to five years ... we'll stop talking about PC cycles and instead talk about Microsoft as the largest cloud-computing company in the world."

Microsoft has certainly moved in that direction. Microsoft's commercial cloud is arguably its single most important business segment, as it holds the most promise for the company's long-term success. In recent quarters, demand for Microsoft's cloud services has been exceptionally strong -- revenue growth has remained in the triple-digits.

But Microsoft faces a lot of competition in that space. In a recent interview, Warren Buffett declared that cloud computing wasn't a winner-take-all-game -- that there was room for multiple suppliers. That may be the case, but Microsoft still has to fend off firms supplying similar products -- Amazon's AWS competes with Microsoft's Azure, Microsoft's Dynamics CRM competes with Salesforce, to cite just a few examples. If Microsoft's cloud growth slows in the quarters ahead, its stock could struggle.

Windows 10 fails and Windows continues its slow slide toward irrelevancy
It would be ignorant to say that Windows is irrelevant. It's still the most popular desktop operating system in the world by far, installed on more than 1 billion PCs.

But it would be equally ignorant to pretend that Windows isn't threatened. Increasingly, mobile devices represent the primary computing device for most people -- even enterprise users. Microsoft is largely a non-factor when it comes to mobile. Its share of the smartphone market is in the low single digits; the few Windows tablets in existence are largely sold as laptop replacements rather than tablet alternatives.

Windows 10 will give Microsoft a chance to bounce back when it debuts later this year. But what if it fails to reinvigorate Microsoft's platform? As smartphones and tablets continue to grow in power and in capabilities, the Windows ecosystem will be eroded even further, eventually to the point of total irrelevancy. Microsoft has already had to make drastic changes to its Windows business, giving certain versions away for free, and Windows-related revenue has contracted in recent quarters. As a software and service provider, Microsoft can still succeed in a world without Windows, but it would be severely disadvantaged.

One of Office's many upstart competitors succeeds
Microsoft Office is a computing staple -- an indispensable tool for millions of users. The Office business has generated tens of billions of dollars for Microsoft over the years, and that doesn't seem likely to change.

Office 365, Microsoft's version of Office for the cloud, has enjoyed an enthusiastic uptake. Last quarter, Microsoft reported that it had 12.4 million consumers subscribing to the service, up a stunning 35% on a sequential basis.

But the Office business is not without competition. Google Docs isn't as powerful, but it's less expensive; Apple offers iWork.

Neither of these alternatives have been successful in destroying Microsoft's business, but they're still something Microsoft shareholders should watch. In the past, Google has explicitly declared its intention to steal the bulk of Microsoft's Office base; Apple has slowly improved iWork, recently opening it up to Windows users.

This may be the least likely possibility, but any significant challenges to the Office business could take quite a toll on Microsoft's financials.