The CEO of coffee chain Starbucks is earning praise from same sex marriage advocates for the company's staunch support of gay rights, including urging a group of activist shareholders to sell their shares if they don't like the company's policies.

At the Starbucks annual general meeting on Friday, chief executive Howard Schultz was accosted by Tom Strobhar, the head of a group called the National Organization for Marriage, an activist group that has lobbied hard against recent legislative moves to legalize same sex marriage and other contentious gay rights issues.

'Sell your shares of Starbucks and buy shares in another company.' —Howard Schultz to an antigay investor

The NOM had called for a boycott of Starbucks locations after it emerged in 2012 that the ubiquitous chain of coffee restaurants was outspoken in favour of gay rights in its internal diversity policies.

At the annual meeting, Strobhar suggested the company's support of gay rights was bad for business, as it was costing the company sales it might otherwise have had.

"If you feel, respectfully, that you can get a higher return than the 38 per cent you got last year, it’s a free country," Schultz said.  "You can sell your shares of Starbucks and buy shares in another company. Thank you very much." His reaction drew loud applause from the audience.

Starbucks has come out as one of the more forceful corporate defenders of gay rights, a battle that will be top of mind in the U.S. Tuesday as the Supreme Court hears arguments in two major gay rights cases — one about the legality of California's Proposition 8, a ballot initiative that questioned the legality of same sex marriages, and the other the Federal Defence of Marriage Act, a 1996 law on the same topic.

The issue has moved from being a rights issue to a corporate one in recent weeks, as a number of business titans have made statements.

Earlier this month, Starbucks was one of dozens of companies that urged lawmakers to legalize same-sex marriage across America, saying it would save them billions in human resources costs by being able to streamline benefits plans