Umar came to the Black Stone and kissed it, then said, "I know that you are only a stone, that you can neither harm nor benefit anyone. Had I not seen the Prophet ﷺ kiss you, I would not have kissed you."
أنه جاء إلى الحجر الأسود فقبله فقال: إني أعلم أنك حجر لا تضر ولا تنفع، ولولا أني رأيت النبي ﷺ يقبلك ما قبلتك.
Bukhari narrated it in the book of Hajj (1597), and Muslim in the book of Hajj (1270:251), both of them through the route of Amash, from Ibrahim, from Aabis bin Rabia, from Umar, as he mentioned it.As for what Hakim narrated (1/457) from the hadith of Abu Saeed Khudri, from Umar, regarding this hadith at length, containing the story concerning Ali, it is not according to the standard of the two Shaykhs, as Hakim himself said, for they did not include Abu Harun Umara bin Juwayn Abdi. Dhahabi said of him, "Discarded." And Hafiz said in Talkhis (2/246), "He is very daif."