"No one ever got fired for buying IBM" probably pre-dates the creation of Microsoft.
The saying was based on the fact that IBM, like the 7th Cavalry, would ride in to rescue large accounts if they screwed up.
I never heard it said of Microsoft in the 90s because Microsoft was never a big proportion of anybody's spending. It sold to hundreds of millions of consumers and small companies, rather than Fortune 500 companies.
I did once discuss this with one of the Microsoft salesmen who handled giant corporations, and who had been hired from IBM. He said IBM tried to get 33% of a company's IT sending whereas Microsoft tried to get 3%.
This is the second time recently I've seen someone on HN refer to this expression with a Microsoft branding.
The late nineties are a little too early for me to have had any awareness of technology politics. I never heard the expression you describe.
I did hear, many times, "nobody ever got fired for buying IBM". It seems odd that that would have been a later form of the expression than "nobody ever got fired for buying Microsoft".