Masjid us Shajarah is on the way from Madina to Makkah and is the miqaat (place to take ahram).
Rasulullah s.a. use to take ahram at this place and use to halt at this masjid while returning from Makkah.
A person who enters Madina must first go to Masjid us Shajarah & pray dua before starting any arkaan.