From Sahih Muslim (Hadith 3346):
Abdullah b. 'Umar (Allah be pleased with them) said:I heard Allah's Messenger (ﷺ) as saying: He who patiently endured the hardships and rigours of (this city, i. e. Medina), I would be his witness and intercessor on the Day of Resurrection
Reference: Muslim 3346