The Messenger of Allah ﷺ did not shake hands with women when taking their pledge of allegiance.
حدثنا عتاب بن زياد أخبرنا عبد الله أخبرنا أسامة بن زيد حدثني عمرو بن شعيب عن أبيه
أن رسول الله ﷺ كان لا يصافح النساء في البيعة
No references are available.
Its isnad is sahih. Suyuti mentioned it in Al-Jami al-Saghir 6895 and attributed it to Ahmad. Its commentator Munawi said, Haythami said, "Its isnad is hasan," end quote. That is why the author marked it as hasan.