Discern (5e Spell)
From D&D Wiki
|Casting time:||1 action|
You focus on a creature in range that you can see, analyzing it. You become clearly aware of one damage vulnerability the creature has if any, and one damage immunity the creature has if any.
At Higher Levels. When you cast this spell using a spell slot of 2nd level or higher, you learn one additional immunity or vulnerability for each level above 1st, as well as an equal number of damage resistances.