Anas bin Malik reported,

The Prophet of Allah ﷺ, with Muaz bin Jabal riding behind him on the saddle, called out, "Muaz."Muaz replied, "At your service, Messenger of Allah, and at your pleasure."The Prophet ﷺ called again, "Muaz."Muaz replied, "At your service, Messenger of Allah, and at your pleasure."The Prophet ﷺ called once more, "Muaz."Muaz replied, "At your service, Messenger of Allah, and at your pleasure."The Prophet ﷺ then said, "There is no servant who testifies that there is no god but Allah and that Muhammad is His servant and Messenger except that Allah forbids him to the Fire."Muaz asked, "Messenger of Allah, shall I not inform the people of this so that they may rejoice?"He replied, "Then they will rely upon it."So Muaz only disclosed it at the time of his death, fearing the sin of withholding knowledge.

Azami 72

Sahih

عن أنس بن مالك

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

الأعظمي 72صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Qualities of faith
Section
Who died upon monotheism will enter Paradise
Numbering
Jami al-Kamil 72 (2nd edition)
Azami 72