The Messenger of Allah ﷺ ordered him to build the mosque of Taif on the site where their idol had stood.
حدثنا محمد بن يحيى حدثنا أبو همام الدلال حدثنا سعيد بن السائب عن محمد بن عبد الله بن عياض
أن رسول الله ﷺ أمره أن يجعل مسجد الطائف حيث كان طاغيتهم
[Its chain is daif]. Abu Dawud narrated it in Al-Salat, chapter on building mosques, no. 450, from the hadith of Abu Hammam with this wording.Muhammad bin Abdullah bin Ayyad was not deemed reliable by anyone except Ibn Hibban, so his status is unknown.