A worker whose temporary H-1B visa was denied while she was waiting for her green card to become available may have to leave the U.S. now that a federal judge has sided with U.S. Citizenship and Immigration Services.

The July 15 decision from Judge Rudolph Contreras of the U.S. District Court for the District of Columbia is a win for the Trump administration amid a wave of litigation over its workplace immigration policies. The H-1B specialty occupation visa program has been a focal point both of additional USCIS scrutiny and federal court challenges to agency decision making.

Whether the job...