Ayesha reported,

Aisha asked, "How should I greet them, Messenger of Allah?" meaning the people of al-Baqi.He replied, "Say, 'Peace be upon the dwellers of these abodes from among the believers and the Muslims. May Allah have mercy on those of us who have gone ahead and those who remain behind. And we, Allah willing, shall join you.'"

Azami 11112

Sahih

عن عائشة قالت

قلت: كيف أقول لهم؟ (تعني أهل البقيع) يا رسول الله قال: قولي: السلام على أهل الديار من المؤمنين والمسلمين، ويرحم الله المستقدمين منا والمستأخرين، وإنا إن شاء الله بكم للاحقون.

الأعظمي 11112صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications for illness and funerals, and what relates to them
Section
Supplication for visiting graves
Numbering
Jami al-Kamil 11112 (2nd edition)