Market cap - what a company "owes" it's investors. Definitely on the liabilities side. The value of the company.
Cash - what a company definitely owns (and could, for instance, pay to it's investors)
So there is this measure of company's worth called "enterprise value" which is Market cap + debt - cash - assets. It sort-of is what you'd get if you acquired the company and immediately sold everything off. To put it another way : it's everything Microsoft has, other than the business it's involved in.
It can indicate that there are deals to be had. For instance if you pay $50 million for a company that has running accounts with $40 million on them, have you really paid $50 million for it ? You had control (through a company) over $50 million, and now you have control over $40 million and a company, so there is an argument to be made that you "only paid" $10 million.
So "enterprise value" is what you would really have to pay for a company, and for a lot of people considered a more useful metric than market cap.