Zuhri reported,

Salim reported that Abdullah bin Umar said, "I went on a military campaign with the Messenger of Allah ﷺ toward Najd. We faced the enemy and drew up our ranks against them. The Messenger of Allah ﷺ stood to lead us in prayer. One group stood with him to pray, while another group faced the enemy. The Messenger of Allah ﷺ performed one bowing with those who were with him and two prostrations, then he gave the closing salutation. After that, each man stood and performed one bowing for himself and two prostrations."

Azami 2902

Sahih

عن الزهري قال

أخبرني سالم أن عبد الله بن عمر قال: غزوت مع رسول الله ﷺ قبل نجد فوازينا العدو فصاففنا لهم، فقام رسول الله ﷺ يصلي لنا، فقامت طائفة معه تصلي، وأقبلت طائفة على العدو، وركع رسول الله ﷺ بمن معه، وسجد سجدتين، ثم سلم. فقام كل واحد منهم فركع لنفسه ركعة، وسجد سجدتين.

الأعظمي 2902صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Prayer of fear
Section
Imam praying one rakat with each group, then giving salutations, and each group completing one rakat on their own
Numbering
Jami al-Kamil 2902 (2nd edition)
Azami 2902