Gay rights advocates and the National Football League said an unnamed team should not have asked a prospective player whether he “likes men,” a question that spotlights broader risks for LGBT employees and employers in an unsettled legal landscape.

The legal questions at play may be less clear-cut, however. Many companies have moved toward inquiring about sexual orientation status during the application process in an effort to diversify candidate pools.

“There are a lot of ways companies are working toward broader goals of diversifying the workplace. But it's risky to actually ask it as a question,” said Sam Schwartz-Fenwick, who leads the LGBT Affinity Group at Seyfarth Shaw. “It's raising a lot of legal risk if you are taking protected categories into consideration.”

➤➤ Get employment law news and commentary straight to your in-box with Labor of Law, a new Law.com briefing. Learn more and sign up here.

Thirty-one states do not include gay, lesbian, bisexual or transgender workers under anti-discrimination laws, and federal appeals courts are divided over whether civil rights law protect sexual orientation. “In the majority of states, if an employer did ask, 'Are you gay?' and didn't hire that person, that person would have no legal recourse,” Schwartz-Fenwick said Friday.

Former LSU running back Derrius Guice told the SiriusXM NFL show “Late Hits” that he was asked about his sexuality and other personal questions during an NFL scouting event. “Some people are really trying to get in your head and test your reaction. … I go in one room, and a team will ask me do I like men, just to see my reaction,” Guice reportedly said.

A spokesman for the NFL called the questioning “inappropriate” and said the league is “looking into the matter.”

“A question such as that is completely inappropriate and wholly contrary to league workplace policies,” Brian McCarthy, an NFL spokesman, said in a statement. McCarthy said the league and the teams “are committed to providing equal employment opportunities to all employees in a manner that is consistent with our commitment to diversity and inclusion, state and federal laws” and the collective bargaining agreement.

“The league annually reminds clubs of these workplace policies that prohibit personnel from seeking information concerning a player's orientation,” McCarthy said in the statement. McCarthy said “clear and specific language” is provided to teams before the scouting process begins that prohibits asking would-be players questions about their sexuality and marriage.

NFL Players Association executive director DeMaurice Smith, speaking to reporters about Guice's remarks, said any team that asked a player about whether he liked men should be banned from scouting events.

Sarah Warbelow, the Human Rights Campaign legal director, said sexual orientation should not be asked to a prospective job candidate.

“It is not appropriate to put someone on the spot and the risk is high that it will be inappropriately used to make negative hiring decisions on those individuals,” Warbelow said. “Even where there are laws in place, it's a risk.”

Over the last several years, companies such as Facebook Inc., IBM Corp. and, most recently, JPMorgan Chase & Co. have begun to ask employees if they want to identify as LGBT in an effort to diversify the workforce and tailor benefits.

Such questions need to be handled delicately and voluntarily, employment attorneys say, otherwise companies could open a door to liability. Any company asking a prospective applicant about sexual orientation should make it clear that being gay is not a factor in the selection process.

Goldman Sachs reportedly asks prospective employees about their orientation at the time a person applies for a job. There is an option to decline to answer. Goldman's chief diversity officer Anilu Vazquez-Ubarri told Fortune last year: “We ask for this data because we want to keep ourselves accountable.”

The Equal Employment Opportunity Commission requires companies to track nationality, race and gender, which are protected traits under civil rights law, of both applicants and employees. LGBT status is not tracked, even though in recent years the agency has pushed its view that sexual orientation should be considered a protected class.

Deena Fidas, director of the Human Rights Campaign's workplace program, said employers who gather information about their workforce “do it in a way that is tightly held within human resources departments.” She said any “thoughtful, deliberate process” of looking at workforce characteristics is a “wholly different category than asking about whether someone is gay or interested in men or women as was reportedly done here.”

Schwartz-Fenwick of Seyfarth said many companies do “purposeful recruiting,” going to minority job fairs, for example. He said career counselors may even recommend that a would-be gay employee make their orientation clear on an application.

Any diversity effort, he said, should not muddy the interview process. Candidates should be selected on their merits, or the company exposes itself to liability, particularly for protected classes. Many companies are moving toward a voluntary form that allows the human resources department to track how good a job they are doing to get a diverse applicant pool and make diverse hiring decisions. “Such efforts speak to the ways that corporate America really continues to be at the forefront of efforts to push diversity,” he said.

Read more: