Detect Magic: 1st-level Divination · A5E.
Until the spell ends, you automatically sense the presence of magic within range, and you can use an action to study the aura of a magic effect to learn its schools of magic (if any).
The spell penetrates most barriers but is blocked by 3 feet of wood or dirt, 1 foot of stone, 1 inch of common metal, or a thin sheet of lead.
Using a Higher-Level Spell Slot.
When using a 2nd-level spell slot or higher, the spell no longer requires your concentration. When using a 3rd-level spell slot or higher, the duration increases to 1 hour. When using a 4th-level spell slot or higher, the duration increases to 8 hours.
Source: A5E System Reference Document (A5ESRD) by EN Publishing, used under the CC-BY-4.0 (credits). Open-licensed 5e content, not part of the official SRD.