i found this hope it helps.
AT&T HTC One M8 unroot utilizing SuperSU or TWRP recovery
This is the first method that you can try using SuperSU.
Open Play store to see if there is a new update for SuperSU, to make sure you are running the most recent version.
Run it from app drawer.
Go to the Settings section above, scroll down the hit Full unroot option. You’ll see a warning message, just tap continues to start the uninstall process.
Once done, the phone will reboot. Your phone should unrooted now after boots up.
at&t htc one m8 unroot
Image: HTC / AT&T
If the above method does not work to unroot AT&T HTC One M8, we are going to tell you how doing it manually.
Boot your phone to TWRP recovery mode by turn off your phone then presses Vol up + Power to boot into bootloader then choose RECOVERY. There is a more simple way, by using “adb reboot recovery”.
Once came into TWRP main menu, now tap Mount -> Mount system then taps Home.
Tap Advanced -> File Manager, browse to “/system/xbin” folder. From there delete su, daemonsu or busybox if it exists. Also browse to “/system/app” the get rid of Superuser.apk.