While Western companies increasingly encourage their employees to be themselves at work, people can run into laws and customs that don’t accept their identities when they travel for business.

It’s a contradiction that corporate travel managers are trying to cope with as they consider their responsibility to keep lesbian, gay, bisexual, transgender, and queer or questioning (LGBTQ) employees safe as they travel. More than 70 countries still criminalize same-sex relationships. In some cases, asking a partner to join you on a business trip or even showing your photos on a social media app can draw unwanted attention.

“You can’t be yourself when you go to these places,” said Jeremy Wilkes, LGBT travel adviser for beTravelwise, a travel safety training and education provider based in the United Kingdom. “You have to moderate your behavior. It’s not an easy thing to talk about and get right policy-wise.”

One particular trouble area can be social media, where employees who are accustomed to welcoming environments at home may share more about their personal lives than they would want strangers to know while traveling.

In Egypt, police have used gay dating apps such as Grindr to entrap people. (While homosexuality is not outlawed in Egypt, people have been charged there with “habitual debauchery.”) Security agents also may demand to search phones or other digital devices. “Don’t give out your passwords, and be careful about what’s on your screens,” Wilkes advised.

Not every country on the list where same-sex relationships are criminalized actually enforces the law. Other countries can at times be more restrictive in practice than their laws might suggest. Russia legally permits homosexuality, for example, but the country bans so-called gay propaganda, and gay men have been detained and persecuted in Chechnya.

Acceptance can vary dramatically in different regions of the same country. And while a particular company may have developed a corporate culture that encourages diversity, its suppliers in other parts of the world may not share those views.

“You can’t say this country is OK and that country isn’t OK,” said Billy Kolber, founder of ManAboutWorld, a digital travel magazine written by gay men and based in New York.

In the U.S., for example, “there are places where queer people’s rights are protected, and the social atmosphere is very open and welcoming,” Kolber said. “There are other places in our country where gay people still face extraordinary discrimination. That’s also true globally.”

Many U.S. states do not have laws that explicitly prohibit discrimination against LGBTQ people — and some have laws that actually target the community. Travel in those states can take a hit. California law doesn’t allow employees using taxpayer money to travel to several states with policies that are deemed discriminatory against the population. And in 2016, the UK Foreign Office issued a travel warning to British citizens about U.S. state laws that affect LGBTQ rights, such as North Carolina’s so-called bathroom bill, which required people to use public restrooms corresponding with their biological sex at birth.

After the NCAA and others launched boycotts, North Carolina repealed the law but imposed a temporary ban on local nondiscrimination ordinances. Mississippi also passed a law that allows business owners to deny service to LGBTQ people based on religious beliefs. Earlier this year, the U.S. Supreme Court declined to hear an appeal of that law, saying the plaintiffs could not prove they had experienced harm.

Saul Shanagher, director of beTravelwise, points out that everyone has personal risk factors based on traits such as race, gender, sexuality, and travel experience. Companies need to make information on potential risks available to everyone, since they can’t ask who their LGBTQ employees are or assume that everyone is out about their sexual orientation at work.

It’s valuable to have an LGBTQ advocate or resource group that employees can contact if they don’t feel comfortable traveling somewhere but don’t know how to approach their boss directly. Employees should not be penalized for declining travel to a particular country if they feel the risks are too great.

For business travelers, resources such as ManAboutWorld’s The LGBTQ Guide to Travel Safety and Stonewall’s Global Workplace Briefings can help in evaluating potential risks.

Kolber recommends that employees find out how much they are protected by their company before they leave their home countries. Travelers should be mindful of behavior that could endanger locals, he said. Around the world, white men are treated differently from women of color, he added, and people who do not present themselves in line with traditional gender norms can face greater challenges.

Situations can change quickly, so it’s a good idea to contact a local LGBTQ organization in the destination country for additional research.

“The reality is that most LGBT businesspeople are traveling in the closet,” Kolber said. “You’re generally on a business trip traveling by yourself, and typically in the kinds of hotels that people stay on business – globally branded hotels and international work environments – the risks are actually really, really small. Sometimes it’s just a question of mitigating the fear.”

Photo Credit: While marriage equality is now a reality in the U.S., many countries criminalize same-sex relationships and some states do not have laws that prohibit discrimination. Experts say LGBTQ business travelers should prepare themselves with information when traveling to another country. Pictured are demonstrators outside the Supreme Court in 2015. Jose Luis Magana / Associated Press