Abdullah bin Abbas reported,

The Prophet ﷺ used to say at times of distress, "There is no god but Allah, the Forbearing, the Generous. Glory be to Allah, Lord of the Mighty Throne. Glory be to Allah, Lord of the seven heavens and Lord of the Noble Throne."Waki once said, "There is no god but Allah" in all of them.

Ibn Majah 3883

Sahih

حدثنا علي بن محمد حدثنا وكيع عن هشام صاحب الدستوائي عن قتادة عن أبي العالية

عن ابن عباس

أن النبي ﷺ كان يقول عند الكرب لا إله إلا الله الحليم الكريم سبحان الله رب العرش العظيم سبحان الله رب السموات السبع ورب العرش الكريم قال وكيع مرة لا إله إلا الله فيها كلها

ابن ماجه 3883صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Supplication
Chapter
Supplication at times of distress
Numbering
Darussalam 3883
Ibn Majah 3883