the device logs gets 500 error code, you van see this in iphone configuration utility or in apple configurator.
as follows in console:
"US Desc: A transaction with the server at “https://server.com/devicemanagement/api/device/connect” has failed with the status “500”.
Domain : MCHTTPTransactionErrorDomain
Code : 23001
Type : MCFatalError