He heard it from Shahr bin Hawshab, who said that Asma bint Yazid informed him, "The Prophet ﷺ passed by us while we were among a group of women and greeted us."
حدثنا أبو بكر بن أبي شيبة حدثنا سفيان بن عيينة
سمعه من شهر بن حوشب يقول أخبرته أسماء ابنة يزيد مر علينا النبي ﷺ في نسوة فسلم علينا
[Its isnad is hasan] Ibn Majah reported it in the Book of Manners, chapter on greeting children and women, no. 3701, from Abu Bakr bin Abu Shayba, and it is also in al-Musannaf, 8/446-447. Tirmidhi graded it hasan, no. 2697. Muhajir al-Ansari also narrated it from Asma bint Yazid.