The exchange drew instant outrage from other Twitter users, who scolded both lawmakers for making light of serious issue that has been at the forefront this legislative session.
In addition to the nondiscrimination issue, lawmakers are proposing bills requiring transgender people to use the restroom of their gender at birth and a series of other bills relating to same-sex marriage.
"To see them joking around like that, it's hurtful and painful," said Claire, a transgender Utahn who asked her real name not be used. "It's just upsetting that politicians always distill transgender issues down to our genitals and using the bathroom and ignore all the rest of the experiences to reduce our struggle down to those two issues and then make social media jokes about it."
Both lawmakers apologized for the tweets.
Niederhauser, R-Sandy, said the tweets were actually sent by his intern who "took some liberties."
"It's an embarrassing situation for me, and it's an embarrassing situation for her," Niederhauser said. "The tweet does not reflect anything I believe in. I have deep respect for the people in the LGBT community and continue to do so."
Niederhauser said he invited the group Equality Utah to the Capitol on Monday evening to discuss the sensitivity of LGBT issues.
Anderegg said he didn't mean to be insulting, but didn't understand the sensitivity of the issue.
"I completely own it. It was inappropriate. … It was an offhand, stupid comment and I was trying to be funny," he said. "The truth is I probably need to be a little more brought up to speed on the issue. It's obviously very sensitive, in which case a tweet like that probably means something very hurtful to someone and I didn't realize it was."