He had companionship with the Messenger of Allah ﷺ. He said, "I heard the Messenger of Allah ﷺ say, 'When a servant has been destined by Allah to attain a rank that he cannot reach through his deeds, Allah tests him in his body, his wealth, or his children.'"
حدثنا عبد الله بن محمد النفيلي وإبراهيم بن مهدي المصيصي المعنى قالا حدثنا أبو المليح عن محمد بن خالد قال أبو داود
وكانت له صحبة من رسول الله ﷺ قال سمعت رسول الله ﷺ يقول إن العبد إذا سبقت له من الله منزلة لم يبلغها بعمله ابتلاه الله في جسده أو في ماله أو في ولده
[Hasan] Ahmad : 5/252 recorded it from the hadith of Abu Malih through him, but its chain of transmission is daif due to the unknown status of Muhammad bin Khalid and his father. See Majma al-Zawaid : 2922. The hadith has corroborating narrations in Ibn Hibban, no. 2908, and elsewhere, and with these it is hasan. See also Targheeb wal-Tarheeb : 4/283.