When Ernst & Young asked John Riggs, a partner at the accounting firm, to move to its Russian office, he flatly refused. That could damage an employee’s career at many companies, but the firm instead turned around and offered Riggs a position in Paris, which he happily accepted.

I didn’t want to go back in the closet in order to work in Russia.

Why was E&Y so accommodating? “I explained to the firm that I am gay and would worry about my safety in Russia,” Riggs said. “I didn’t want to go back in the closet in order to work in Russia, and the people at E&Y were very understanding about that.”

He didn’t fear being arrested or abused in Paris, but he did have to travel to Middle Eastern countries with laws that criminalise homosexual activity. “I remember taking a two-week trip to Dubai and asking my partner if he wanted to come along,” Riggs said. “But someone at work counseled me that it was probably not a good idea because we would be sharing the same hotel room and could be arrested if people thought we were gay.” Consensual sodomy can carry a sentence of up to 14 years in prison in Dubai, according to Human Rights Watch.

Foreign postings pose challenges and require adjustments for anyone regardless of sexual orientation. But unlike most other people, lesbian, gay, bisexual and transgender (LGBT) employees are often offered assignments in countries that are unfriendly or even dangerous for them.

Some 80 countries have anti-LGBT laws, according to the Human Rights Watch. Nearly half outlaw “unnatural” or “indecent acts”.

Some 80 countries have anti-LGBT laws, according to Human Rights Watch. Nearly half of these countries outlaw “unnatural” or “indecent” acts. Only 12% criminalise same-sex relations between women, while almost all outlaw same-sex relations between men.

As for punishment, nearly 60% of countries with anti-LGBT laws can impose prison sentences of up to 10 years; 27.2%, 10 years to life; and 7.6%, the death penalty.

“In many parts of the world, the laws are dormant and aren’t used to arrest people,” said Graeme Reid, director of the LGBT programme at Human Rights Watch. “But they have other insidious effects and contribute to a climate of discrimination and even violence, blackmail or extortion. People are reluctant to report an attack to the police or even access health care for fear they will be exposed as LGBT.”

More than two-thirds of the gay senior business executives at a conference in Europe said they had turned down a promotion opportunity in another country because of unfriendly laws.

As more LGBT people come out at work and the international mobility of the workforce increases, such hostile laws and cultural homophobia are becoming more problematic for businesses. They may prevent an employer from sending its best talent to some locations simply because of a worker’s sexual orientation. More than two-thirds of the gay senior business executives at a conference in Europe said they had turned down a promotion opportunity in another country because of unfriendly laws.

If LGBT individuals accept a job in a country with homophobic laws, they may have to keep their personal lives private. In some of these countries, there may be a thriving, clandestine gay scene, but even discreet involvement with other gay, lesbian or transgender individuals in certain places could be risky.

Employees say they are more productive if they don’t have to expend energy concealing their sexual orientation at work. One gay man described the burden of being closeted in the office “as a lead overcoat. It’s oppressive and always with him,” said Todd Sears, the founder of Out Leadership, a global LGBT organisation that works with multinational companies to promote equality. “It’s damaging to the psyche of LGBT employees.”

When children factor in

It’s especially troublesome when an employee brings along a same-sex partner and even more so, if children are in the equation. Calling both parents mummy would likely create problems for the family in many countries.

Some companies provide greater flexibility for gay employees who decide it’s too dangerous to bring partners or children along. In such cases, for example, Royal Dutch Shell lets employees make more visits back home than usual. Shell also offers international commuting assignments that allow the employee to spend three to four days a week in the host country and the rest of the week with his family back home. In addition, LGBT employees at Shell can be considered for a virtual global assignment, using the internet, conference calls and other tools to work with a team in another country and traveling there occasionally.

You feel like you go back in time 20 years if you’ve been out and open in your own country.”

“Because of the culture, a gay couple may have to act like roommates or may not even be able to live in the same house,” said Chris Crespo, director of LGBT inclusiveness at E&Y. “You feel like you go back in time 20 years if you’ve been out and open in your own country.”

A matter of safety

Gay employees must be particularly careful in countries like Saudi Arabia, where talking about one’s family is part of the build-up to doing business together, Crespo said. “One man who had a male partner acted as if he were single and focused mostly on his mother and father in such discussions.” Saudi Arabia can impose the death penalty for gay sexual acts.

E&Y and other multinationals consider their employees’ safety paramount and provide detailed information about the laws and the cultural climate for LGBT people in countries where they do business. “We need to make sure we don’t oversell how we can protect their safety,” Crespo said. “But we do present the pros and cons of an assignment to help employees decide.”

Ultimately, that choice is up to the individual. If someone feels strongly about working in the energy industry, for example, he may be willing to make the personal sacrifices necessary to live safely in a Middle Eastern country.

Even business travel to unfriendly countries can be difficult for gay and transgender workers. “I keep my head down and don’t say much about my private life,” said Hamish McArdle, a partner in the London office of the law firm Baker Botts who travels frequently to the Middle East and Africa. “I like to be as anonymous as possible and don’t want to come up against people in authority like the police or immigration officials.”

Hurting one’s career

Turning down an assignment abroad could limit an employee’s future opportunities. That’s why LGBT advocacy groups and some employers urge people to be open about their sexual orientation and gender identity in the workplace so their bosses understand why they won’t move to certain countries.

Mark McLane, global head of diversity and inclusion at Barclays, knew that international experience would be critical to becoming a serious candidate for top leadership positions. So before joining a company, he disclosed that he is gay and asked if his career would be negatively affected if he declined an international assignment because of anti-LGBT laws.

You have to have a certain trust in an organisation to self-identify as gay.

Both Barclays and Whirlpool, his former employer, said in such cases, they’d find him another global opportunity. “You have to have a certain trust in an organisation to self-identify as gay,” McLane said. In countries where employment laws permit it, Barclays employees can disclose their sexual orientation in opinion surveys.

Some businesses find ways for employees who want to keep their sexual orientation private to still opt out of certain countries. The law firm Simmons & Simmons used to simply ask its junior lawyers if they’d be interested in an international experience. Now, it lists specific cities so employees can check off the ones they prefer. “You don’t have to out yourself to avoid going to countries that could be risky,” said David Stone, a partner in the firm’s London office.

In addition, young lawyers at Simmons & Simmons can get an LGBT mentor to answer questions like, “Can I take my boyfriend?” or “Is it safe for two men to hold hands on the street?” If employees do move to a country with anti-gay laws and get in harm’s way, they can call emergency contact numbers and have access to high-level people at Simmons & Simmons.

Some employers are trying to change the laws and culture in homophobic countries. Several major companies (including Google, Barclays, BP and Goldman Sachs) sponsor Pink Dot in Singapore, an annual gay rights event featuring LGBT speakers, community groups and entertainment.  “Corporate involvement makes Pink Dot seem more mainstream and not a deviant event,” said Kenji Yoshino, a professor at the New York University School of Law and co-author of Out in the World, a recent LGBT workplace study by the Center for Talent Innovation.

Sometimes companies voice their displeasure about existing or proposed anti-LGBT laws. Barclays let the Uganda government know that it opposed proposed legislation that called for punishment by death for gay individuals, McLane said. “We monitored the legislation as it went through debate.” The legislation with the death penalty was never enacted, but gays still can be imprisoned in Uganda under a colonial-era law that criminalises sexual activity.

Companies need to monitor countries closely because policies and laws often change. “You might think a country is making progress on LGBT issues and then a new regime comes in and changes things,” McLane said. “Laws can change week to week.”

Indeed, some Indonesian officials and Islamic clerics are condemning homosexuality and calling for harsh punishment. Some LGBT organisations are trying to stop such legislation by pointing out that it would make Indonesia a less attractive place to do business. Such discrimination “negatively affects companies’ ability to recruit and retain top talent, and it can prevent companies from locating their best talent within countries with hostile environments for LGBT people,” Sears of Out Leadership wrote in an opinion piece last month in the Jakarta Post. “All eyes are on Jakarta’s leaders to make it clear to international investors that the country is open to business — for everyone.”

Despite the increasingly strident homophobia in Indonesia, Yoshino is optimistic that the spread of same-sex marriage and the growing visibility of LGBT people will turn the tide in many countries. “I feel we’re approaching a tipping point,” he said. “Our visibility is a huge asset, and it’s hard not to see LGBT progress as a global phenomenon, especially when we’re all so connected via the internet.”

To comment on this story or anything else you have seen on BBC Capital, head over to our Facebook page or message us on Twitter.