dnd 3e – Spellthief, Steal spell and Sneak attack immunity

Simple question. It’s never clear if you can use the Steal Spell feature of the SpellThief on targets immunised to Sneak Attack.

Since you have to trigger a Sneak Attack in order to be able to trade it for steling spells, it is a fair question.

For example, I’m fighting an undead who cast spells. Its flat-footed for some reason, or I might just be able to flank it. Even if I could make a Sneak Attack, it wouldn’t deal any damage because undead are immune to this Extraordinary Ability.

BUT. Since all the conditions are met, can I still trade my Sneak Attack damage to use my Steal Spell Supernaturel Ability ?