Grafdigger's Cage has a static ability that reads: "Cards in libraries can't enter the battlefield, and spells can't be cast from graveyards or libraries." This directly prevents any spell from being cast from a graveyard (CR 614.1a — a continuous effect that restricts actions).
Snapcaster Mage gives a card in your graveyard flashback equal to its mana cost. Flashback (CR 702.33a) is an alternative cost that lets you cast the card from your graveyard. However, because Grafdigger's Cage prohibits casting spells from graveyards entirely, that casting action is simply illegal while the Cage is on the battlefield.
It does not matter that the flashback ability was already granted by Snapcaster Mage — the Cage's restriction applies at the moment you would actually cast the spell, and casting from a graveyard is forbidden regardless of how that permission was granted (CR 601.2, CR 614.1a).
Concrete example: You control Grafdigger's Cage and your opponent plays Snapcaster Mage, targeting a Lightning Bolt in their graveyard. The Bolt gains flashback, but your opponent cannot pay its flashback cost and cast it from the graveyard because Grafdigger's Cage forbids it. The Bolt simply remains in the graveyard.
Note that Snapcaster Mage itself can still enter the battlefield and grant the ability — Cage only stops the subsequent casting from the graveyard, not the Mage's triggered ability itself.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.