The Prophet (ﷺ) heard a person praying saying -
اَللَّهُمَّ إِنِّي أَسْأَلُكَ بِأَنَّ أَشْهَدُ أَنَّكَ أَنْتَ اللَّهُ لَا إِلَهَ إِلَّا أَنْتَ الْأَحَدُ الصَّمَدُ الَّذِيْ لَمْ يَلِدْ وَلَمْ يُوْلَدْ وَلَمْ يَكُنْ لَهُ كُفُوًا أَحَدٌ
اَللّٰهُمَّ اِنِّىْ اَسْاَلُكَ بِاَنَّ اَشْهَدُ اَنَّكَ اَنْتَ اللّٰهُ لَا اِلٰهَ اِلَّا اَنْتَ الْاَحَدُ الصَّمَدُ الَّذِىْ لَمْ يَلِدْ وَلَمْ يُوْلَدْ وَلَمْ يَكُنْ لَّهٗ كُفُوًا اَحَدٌ
Allaahumma inni as-aluka bi anna ash-hadu annaka antallahu laa ilaaha illaa antal a'hadus samadulladhi lam yalid wa lam yulad wa lam yakun lahu kufuwan a'had
O Allah, I ask You, by the fact that I bear witness that You are Allah. There is none worthy of worship but You, the Only God, Independent of creation, Who was not begotten and begets not, and none is equal to Him.
Then the Prophet (ﷺ) said, You have supplicated Allah using His Greatest Name, when asked with this name He gives, and when supplicated by this name he answers.