However, only a fraction of those affected may receive compensation.
Legal filings indicated that 250,000 people had lost some Â£130m in benefits.
The Court of Appeal suggested the Department for Work and Pensions would owe a mere 1% of that amount, Â£1.3m, to just 2,500 people.
The complex judgment on Friday was originally prompted by a challenge from Cait Reilly, a geology graduate from Birmingham.
She had argued that requiring her to work at Poundland for no pay constituted a breach of her human rights.
The government - to counter such claims - had retrospectively altered the law to validate the docking of benefits.
Today, the Court of Appeal ruled that even under that new revised law, the docking of benefits could be incompatible with the European Convention of Human Rights.
The Court's ruling represented a defeat for the government.
Padraig Hughes, of Public Interest Lawyers, the group that brought Ms Reilly's case, said: "It is yet a further example of the reckless approach this Government continues to take towards the constitution and the rule of law."
The Court of Appeal judges did nevertheless acknowledge that government ministers can change laws to affect cases retrospectively.
And the judges decided that the only rights infringed upon where those of people that had already claimed the benefits docking was unfair.
This narrowing of the claimants explains why only a tiny fraction of people will be eligible for a payout.
"We are considering the judgment", a DWP spokesman said. "It is only right that jobseekers do all they can to find work while claiming benefits."
It is not clear yet whether either side will make a further appeal.

The Queensferry Crossing had been expected to open at the end of 2016 but there are fears that adverse weather conditions may delay its completion.
Transport Scotland said the contractor was working to ensure the Â£1.35bn bridge was open "as soon as possible".
The Scottish Conservatives said any delay would be of "serious concern" to commuters.
In February, the national transport agency said the project was scheduled to finish "on time and under budget".
But in the wake of newspaper reports that the opening of the bridge could be delayed, they would not name a completion date.
Nicola Sturgeon is to field a question on the matter on Thursday, with Lib Dem MSP Alex Cole-Hamilton lodging a query about the opening date at first minister's questions.
A Transport Scotland spokesman said: "As previously stated the contractor, Forth Crossing Bridge Constructors, is making every effort to open the bridge as soon as possible, despite the challenge that the weather presents."
Alex Johnstone, transport spokesman for the Scottish Conservatives said the government "needs to be open" so commuters know when the bridge will open.
"Ministers weren't slow to celebrate the bridge coming in under budget, and have said for some time that it is on schedule," he said.
"The public will expect them to be equally open when things aren't going to plan."
The government has lost the latest round of an extended legal battle involving the docking of benefits for jobseekers who refused to participate in unpaid back-to-work schemes.
[NEXT_CONCEPT]
The Scottish government has been urged to confirm when the new Forth bridge will open.