Our party recently acquired a staff of defense. Apart from the AC bonus, it also lets you:
With the staff in hand, you can use your action to cast one of the following spells from the staff if the spell is on your class's spell list: mage armor (1 charge) or shield (2 charges).
Now the only primary spellcaster in our party is a warlock, who doesn't have either spell in their spell list. Beyond that, we have a warrior, rogue, ranger, and druid.
How can we gain the entire benefits of the staff?
I've thought of taking the Magic Initiate Feat, but I'm at a loss for how else we could get its full benefits.