I was riding behind the Messenger of Allah ﷺ when he said, "Muaz, do you know what Allah's right is over His servants?"I replied, "Allah and His Messenger know best."He said, "That they worship Him and associate nothing with Him."Then he asked, "Do you know what the servants' right is over Allah if they do that?"I replied, "Allah and His Messenger know best."He said, "That He will not punish them."
حدثنا وكيع عن إسرائيل عن أبي إسحاق عن عمرو بن ميمون
كنت ردف رسول الله ﷺ فقال يا معاذ أتدري ما حق الله على العباد قال قلت الله ورسوله أعلم قال أن تعبدوه ولا تشركوا به شيئا قال فهل تدري ما حق العباد على الله إذا هم فعلوا ذلك قال قلت الله ورسوله أعلم قال لا يعذبهم
Its isnad is sahih, and it is a well-known hadith mentioned many times before. It is found in Bukhari 13/347 number 7373 Fath, and Muslim 8/59 number 51.