A slave came and pledged allegiance to the Messenger of Allah ﷺ for emigration, without the Prophet ﷺ realizing that he was a slave. Then his master came looking for him.The Prophet ﷺ said, "Sell him to me."So he bought him in exchange for two black slaves. After that, he never accepted anyone's pledge of allegiance without first asking whether he was a slave.
أخبرنا قتيبة قال حدثنا الليث عن أبي الزبير
جاء عبد فبايع رسول الله ﷺ على الهجرة ولا يشعر النبي ﷺ أنه عبد فجاء سيده يريده فقال النبي ﷺ بعنيه فاشتراه بعبدين أسودين ثم لم يبايع أحدا بعد حتى يسأله أعبد هو