WASHINGTON — President Obama worked successfully to end discrimination against gays in the military and moved swiftly to implement a Supreme Court ruling protecting married gay couples from federal discrimination.

But gay rights advocates are upset about something he has not done that they say he could accomplish with a pen stroke: an executive order banning federal contractors from discrimination based on sexual orientation or gender identity.

Advocates say an order would provide employment protections for about 11 million workers who currently have none. Many of the nation’s largest companies and 21 states already have policies or laws against sexual-orientation discrimination, but workers at many medium-sized companies in conservative states lack such a shield.

“This is the single most important thing that President Obama can do on his own in his second term to eradicate discrimination from the workplace,” said Ian Thompson, a legislative representative in the Washington office of the American Civil Liberties Union.

Precedent exists for such a move. In 1965, President Lyndon B. Johnson banned companies that do business with the federal government from racial discrimination in employment, hiring or promotions. The proposed ban on sexual-orientation discrimination is modeled after the Johnson-era order.

White House spokesman Jay Carney said this week that the administration wants Congress to pass the Employment Non-Discrimination Act, which, unlike an executive order, would reach companies that do not do business with the federal government. The proposed bill would ban discrimination based on sexual orientation by most companies with 15 or more employees.

“What we’re focused on is a legislative remedy that would be more comprehensive and that has already seen progress in Congress,” Carney said.

But although the bill passed the Senate in November on a 64-32 vote with support from 10 Republicans, Speaker John A. Boehner, R-Ohio, has said he won’t bring it up for a vote in the House.

“Given the stranglehold on passage of LGBT legislation through the House, it seems that at least until the next election, nothing is going to happen,” said Jon Davidson, legal director of Lambda Legal, a gay rights organization

“It seems like low-hanging fruit,” said Gregory Nevins, a staff attorney with Lambda. “I don’t know why it hasn’t been seized upon.”

One reason may be that Republicans increasingly have made a political issue of Obama’s use of executive actions to bypass stalemates in Congress. This week, the House passed two bills aimed at what Majority Leader Eric Cantor, R-Va., called “the president’s dangerous search for expanded power.”