Anas bin Malik reported,

The Prophet ﷺ was riding with Muaz seated behind him on the saddle.He said, "Muaz bin Jabal."Muaz replied, "At your service, Messenger of Allah, and at your pleasure."He said again, "Muaz."Muaz replied, "At your service, Messenger of Allah, and at your pleasure," three times.The Prophet ﷺ said, "There is no one who testifies that there is no god but Allah and that Muhammad is the Messenger of Allah, sincerely from his heart, except that Allah forbids the Fire from touching him."Muaz said, "Messenger of Allah, shall I not inform the people so they may rejoice?"He replied, "Then they will rely upon it."Muaz disclosed this only at the time of his death, fearing the sin of withholding knowledge.

Bukhari 128

Sahih

حدثنا إسحاق بن إبراهيم قال حدثنا معاذ بن هشام قال حدثني أبي عن قتادة قال حدثنا

أنس بن مالك

أن النبي ﷺ ومعاذ رديفه على الرحل قال يا معاذ بن جبل قال لبيك يا رسول الله وسعديك قال يا معاذ قال لبيك يا رسول الله وسعديك ثلاثا قال ما من أحد يشهد أن لا إله إلا الله وأن محمدا رسول الله صدقا من قلبه إلا حرمه الله على النار قال يا رسول الله أفلا أخبر به الناس فيستبشروا قال إذا يتكلوا وأخبر بها معاذ عند موته تأثما

البخاري 128صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Knowledge
Chapter
Those who taught knowledge to some people and not others, fearing they would not understand
Numbering
Darussalam 128
Bukhari 128