Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
tabarani:13548ʿAlī b. ʿAbd al-ʿAzīz > Ibn al-Aṣbahānī > Sharīk > Layth > Mujāhid > Ibn ʿUmar

[Machine] It was said to him, "When we enter upon the rulers, we say to them what we do not say to them when we leave from their presence." So he said, "We used to consider that as hypocrisy during the time of the Prophet ﷺ."  

الطبراني:١٣٥٤٨حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ الْعَزِيزِ ثنا ابْنُ الْأَصْبَهَانِيِّ ثنا شَرِيكٌ عَنْ لَيْثٍ عَنْ مُجَاهِدٍ عَنِ ابْنِ عُمَرَ قَالَ

قِيلَ لَهُ إِنَّا إِذَا دَخَلْنَا عَلَى الْأُمَرَاءِ قُلْنَا لَهُمْ مَا لَا نَقُولُ لَهُمْ إِذَا خَرَجْنَا مِنْ عِنْدِهِمْ فَقَالَ «كُنَّا نَعُدُّ ذَلِكَ نِفَاقًا عَلَى عَهْدِ رَسُولِ اللهِ ﷺ»  


See similar narrations below:

Collected by Ibn Mājah
ibnmajah:3975ʿAlī b. Muḥammad > Khālī Yaʿlá > al-Aʿmash > Ibrāhīm > Abū al-Shaʿthāʾ

“It was said to Ibn ‘Umar: ‘We enter upon our rulers and say one thing, and when we leave we say something else.’ He said: ‘At the time of the Messenger of Allah ﷺ, we used to regard that as hypocrisy.’”  

ابن ماجة:٣٩٧٥حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ حَدَّثَنَا خَالِي يَعْلَى عَنِ الأَعْمَشِ عَنْ إِبْرَاهِيمَ عَنْ أَبِي الشَّعْثَاءِ قَالَ

قِيلَ لاِبْنِ عُمَرَ إِنَّا نَدْخُلُ عَلَى أُمَرَائِنَا فَنَقُولُ الْقَوْلَ فَإِذَا خَرَجْنَا قُلْنَا غَيْرَهُ قَالَ كُنَّا نَعُدُّ ذَلِكَ عَلَى عَهْدِ رَسُولِ اللَّهِ ﷺ النِّفَاقَ