The first half of it has a corroborating report from Ibn ʿAbbas, attributed to the Prophet. Ibn al-Jawzi recorded it in Dhamm al-Hawā (p. 126).
1221 — “When Allah intends to take the soul of a servant in a land, He gives him a need there.”
Ibn ʿAdi recorded it in al-Kāmil (236/2), and Abu Nuʿaym in al-Ḥilyah (8/374), through ʿUbayd Allah ibn Abi Humayd, from Abu al-Mulayh, from Abu ʿAzzah al-Hudhali—a Companion—who said: The Messenger of Allah said this.
I say: This ʿUbayd Allah is abandoned in hadith, as al-Hafiz stated. However, Ayyub corroborated him, reporting it from Abu al-Mulayh ibn Usamah. Al-Bukhari recorded it in al-Adab al-Mufrad (1282), as did Ibn Hibban (1815), al-Dulabi in al-Kunā (1/44), and Ahmad (3/429), from whom al-Hakim also recorded it (1/42). He said: “It is authentic; all of its narrators, without exception, are trustworthy.” Al-Dhahabi agreed with him, and it is as they both said.
It also has a corroborating report from Matar ibn ʿAkamis al-Sulami, attributed to the Prophet, with the same wording. Al-Bukhari recorded it in al-Tārīkh (4/1/400), as did al-Hakim (1/42), through Sufyan al-Thawri, from Abu Ishaq, from him. Al-Hakim said: “Authentic according to the criteria of the two Shaykhs,” and al-Dhahabi agreed with him. It is as they both said, provided that Abu Ishaq—who was al-Sabiʿi—heard it from Matar, for he practised tadlis.
It has another corroborating report from Jundub ibn Sufyan, who said: The Messenger of Allah said this. Al-Hakim recorded it (1/367) through al-Hasan, from him. Al-Hasan was al-Basri, and he too practised tadlis. I then found that Ayyub narrated the hadith from Abu al-Mulayh, from Usamah ibn Zayd, attributed to the Prophet, in similar wording. Al-Tabarani recorded it in al-Muʿjam al-Kabir (1/23/2): Ishaq ibn Ibrahim al-Dabari narrated to us; ʿAbd al-Razzaq informed us; Maʿmar informed us, from Ayyub, with the same report.