Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) narrates: When you go to an awe-inspiring ruler and you fear that he may act violently against you, then recite:
'Allahu akbar, Allahu akbaru min khalqihi jami'an, Allahu a'azzu mimma akhafu wa ahdhar, a'udhu billahi al-mumsik al-samawat al-sab' an yaqa'na ala al-ardi illa bi'idhnih, min sharri abdika fulan, wa junudih, wa atba'ih, wa ashya'ihi min al-jinni wal-ins, ilahi, kun li jaran min sharrihim, jalla thana'uk, wa azza jaruk, wa tabaraka ismuk, wa la ilaha ghayruk'
(Allah is the Greatest; Allah is greater than all His creation; Allah is mightier than what I fear and what I am wary of. I seek refuge in Allah, who holds back the seven heavens from falling upon the earth except by His permission, (O Allah, I seek Your refuge) from Your servant so-and-so, his armies, his followers and his supporters, whether from the jinn or mankind. O Allah! Be my protector from their evil. Majestic is Your praise, mighty is Your protection, blessed is Your name, and there is no god besides You.)
Al-Tabarani recorded it; its narrators are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الأدعية / 17447