We ran into an issue recently where weren't able to completely enroll machines. Through the enrollment process we would see the machines receive MDM profile.(they would join to our domain, receive filevault configs, applications etc) In the JSS the machines would have an MDM Capability of "NO" . In the management history (screenshot below) we also saw the ProfileList and CertificateList stuck in Pending status.
We went back and forth with support for a while, unenrolling/reenrolling machines. Checking proxy/firewall settings from the server/clients. Recreated our push certificate. All to no avail.
When we looked at the database, we saw a result like the one below, in which the machines did not have an APN token. Image below (taken from this website https://www.justinrummel.com/debug-apns-issues-for-jamf-softwares-casper-suite/ )
Solution: Our problem was caused by our Linux JSS having lost network time. We corrected network time, and all machines enrolled successfully.