do we have any hadith, companions asking who are these ulil amri?
Yes, the believers do have these reports from the Prophet.
...from Jabir ibn Abdillah al-Ansari that he said: "When Allah, the Mighty, the Great, sent to His Prophet, Muhammad (s.a.w.), the verse, O you who believe! obey Allah and the Messenger and those vested with authority from among you, I said, 'O Messenger of Allah! We know Allah and His Messenger, but who are those vested with authority whose obedience Allah has conjoined to your obedience? (The Prophet) said: 'They are my caliphs, O Jabir! and the Imams of the Muslims after me. The first of them is 'Ali son of Abutalib, then al-Hasan, then al-Husayn, then 'Ali son of al-Husayn, then Muhammad son of 'Ali who is mentioned as al-Baqir in the Torah; you will surely meet him, O Jabir! when you see him convey my salam (greetings) to him. Then as-Sadiq Ja'far son of Muhammad; then Musa son of Ja'far; then 'Ali son of Musa; then Muhammad son of 'Ali; then 'Ali son of Muhammad; then al-Hasan son of 'Ali; then Muhammad (whose name and patronym will be the same as mine) son of al-Hasan, the Proof of Allah on His earth andBaqiyyatullah (the one kept safe by Allah) among His servants; he is the one by whose hands Allah, Sublime is His remembrance, will conquer the whole world from the east to the west; he it is who will remain hidden from his followers and friends for a such a long period that no one will remain firm on the belief of his imamah except he whose heart has been tested by Allah for faith.'"Jabir says: "I said: 'O Messenger of Allah! Will his followers get any benefit from him during his occultation?' (The Prophet, s.a.w.) said: 'Certainly, by Him Who has sent me with prophethood! they will be guided by his light and benefit from his wilayah(love, mastership) during his occultation as people benefit from the sun when it is hidden in cloud. O Jabir! this is part of the hidden secrets of Allah. So keep it hidden except from the people who deserve to know.'" (Tafsir al-Burhan )