Hadithcore
Sunan Abi Dawud, 2119
da’if· Al-Albani

Narrated Abdullah ibn Mas'ud:

When the Messenger of Allah (ﷺ) recited the tashahhud....He then narrated the same tradition. In this version after the word "and His Messenger" he added the words: "He has sent him in truth as a bearer of glad tidings and a warner before the Hour. He who obeys Allah and His Prophet (ﷺ) is on the right path, and he who disobeys them does not harm anyone except himself, and he does not harm Allah to the least.

حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ، حَدَّثَنَا أَبُو عَاصِمٍ، حَدَّثَنَا عِمْرَانُ، عَنْ قَتَادَةَ، عَنْ عَبْدِ رَبِّهِ، عَنْ أَبِي عِيَاضٍ، عَنِ ابْنِ مَسْعُودٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ إِذَا تَشَهَّدَ ذَكَرَ نَحْوَهُ وَقَالَ بَعْدَ قَوْلِهِ ‏"‏ وَرَسُولُهُ ‏"‏ ‏.‏ ‏"‏ أَرْسَلَهُ بِالْحَقِّ بَشِيرًا وَنَذِيرًا بَيْنَ يَدَىِ السَّاعَةِ مَنْ يُطِعِ اللَّهَ وَرَسُولَهُ فَقَدْ رَشَدَ وَمَنْ يَعْصِهِمَا فَإِنَّهُ لاَ يَضُرُّ إِلاَّ نَفْسَهُ وَلاَ يَضُرُّ اللَّهَ شَيْئًا ‏"‏ ‏.‏

References2 variants
In-Book Reference
Book 12, Hadith 74
English Reference
Book 11, Hadith 2114