Mrs Maguire's husband Don, children and nephews - who were not at London's High Court for the ruling on Monday - wanted Mr Justice Holroyde to order the decision taken by assistant West Yorkshire coroner Kevin McLoughlin to be reconsidered.
An inquest into Mrs Maguire's death is due to take place before a jury at Wakefield Coroner's Court in November.
The 61-year-old teacher was stabbed in the back by 15-year-old Will Cornick as she taught a Spanish class at Corpus Christi Catholic College in Leeds in April 2014.
After pleading guilty, Cornick was later sentenced to life with a minimum term of 20 years.
Dismissing the claim for judicial review, the judge said: "I have much sympathy for the claimants, and I fully understand their reasons for wishing to pursue this line of inquiry.
"For the reasons I have given, however, I am unable to accept the submission that the assistant coroner reached a decision which was so seriously flawed as to be ...unreasonable."
Last month counsel Nick Armstrong told the judge "all the lessons that can be learned from this enormous tragedy are learned".
Mr Armstrong said that over the three hours before the murder, Cornick told other students what he intended to do, and showed a number of them the knife - yet no report to a member of staff was made, at least until it was too late.
The coroner said those students - now adults - were "potentially vulnerable" and were not to be re-approached, with the result that only transcripts of their interviews with police at the time would be adduced.
Mr Armstrong said: "His decision was a blanket one based on limited and generic evidence about vulnerability generally."
This approach was unlawful, said counsel.
Macgure has been described as someone who was dedicated to her faith. The Pope led the tributes at the time of her death.