In D&D 5e, if a School of Divination wizard uses the Portent feature on a legendary monster to assign it a failing saving throw, can the legendary monster use their legendary resistance to choose to pass the saving throw anyway?
Excellent question. Yes the legendary creature can still force a success.
How this works is portent needs to make the Legendary creature use the roll from itself before the roll is actually made, thus giving them a failing saving throw immediately. The legendary creature would then uses their legendary resistance which takes place after the roll is made and results determined, declaring the save a success as a replacement effect.
Yes. The Legendary Resistance ability is phrased as "If the [creature] fails a saving throw, it can choose to succeed instead." This doesn't specify anything about whether the saving throw was from a physical dice roll or some other source, just that it can be used to prevent a failed saving throw.