To answer these questions,
let's first take a look at a map of LGBT legislation around the world.
As you can see, Europe provides the most protection against discrimination
based on person's sexual orientation or gender identity.
Many other parts of the world offer some protection, but
a vast majority still offers no protection at all.
For example, in India law stating from the colony
era prohibit LGBT from having same sex relations.
In countries with such laws in place is difficult for
the LGBT community to have legal protection in the workplace.
In United States, there's no federal law protecting the rights of LGBT employees.
At the state level, however, there's state level protection for
sexual orientation in 31 of the 50 US states such as Utah and Maryland.
If you focus on gender identity,
there's no state level gender identity protection in 33 of the 50 US states.
This means that in states with no such protection, firm can fire employees for
being LGB or transgender, with no or limited negative consequences.
As you can see as of 2015, 61 countries prohibit
discrimination in employment on the basis of sexual orientation.
In some countries such as India, Singapore and
Morocco, homosexuality itself is illegal, so
the LGB people are not protected against discrimination in or out of the workplace.
In other countries such as the United States or
Canada, laws of anti-discrimination in the workplace exist for
sexual orientation but not for gender identity.