The Polish club beat Celtic 6-1 on aggregate in the third qualifying round tie, only to be eliminated when they forfeited the second leg for fielding an ineligible player.
Legia brought on Bartosz Bereszynski for the last few minutes of the game, believing he had completed a three-match ban, but UEFA ruled that Legia should have registered him for those games and that he was still ineligible.
The Scottish side were awarded a 3-0 win for the second leg, which they had lost 2-0, to qualify on away goals following a 4-4 draw, although they still missed out on the group stage after losing to Maribor in the next round.
"Legia Warsaw argued that the UEFA rules and guidelines surrounding the need to include Bartosz Bereszynski's name on the official list submitted to UEFA were unclear and amounted to 'excessive formalism' and that the sanction was disproportionate," said the Court of Arbitration for Sport (CAS).
But the CAS said it's three-man panel found that "that UEFA's requirement that only listed players can serve pending suspensions did not constitute excessive formalism and that it was compulsory for the club to list the player in order for him to serve his suspension."
It added that there was no need to address Legia's demand for 1.85 million euro ($2.07 million)  compensation for missing out on the next round.