Omens were mentioned in the presence of the Prophet ﷺ, and he said, "The best of them is the good omen, and it should not turn a Muslim back from his purpose. If any of you sees something he dislikes, let him say, 'O Allah, none brings good but You, and none averts evil but You, and there is no power and no strength except through You.'"
حدثنا أحمد بن حنبل وأبو بكر بن شيبة المعنى قالا حدثنا وكيع عن سفيان عن حبيب بن أبي ثابت عن عروة بن عامر قال
ذكرت الطيرة عند النبي ﷺ فقال أحسنها الفأل ولا ترد مسلما فإذا رأى أحدكم ما يكره فليقل اللهم لا يأتي بالحسنات إلا أنت ولا يدفع السيئات إلا أنت ولا حول ولا قوة إلا بك
No references are available.
[Its chain is daif] Bayhaqi narrated it, 8/139, from the hadith of Sufyan Thawri, through this route. Sufyan and Habib bin Abu Thabit both narrated with "an" (without specifying direct hearing).