While enrolling some iPhones into the Microsoft Intune MDM (Mobile Device Management) platform, I recently ran into an issue after the user signs into the Intune Company Portal and the app tries to open Safari to begin the enrollment process and they’re presented with this “Undefined” error as seen to the right. The phone was restored from a backup, so it wasn’t a clean install, but the user never complained about any issues before with the old phone.
While troubleshooting this issue and browsing to Settings > Safari, I noticed that the “Block All Cookies” setting was enabled. Since Microsoft Intune was trying to pass the authentication through Safari, it was blocking the cookie the site needed to verify that the user was authenticated. After turning off “Block All Cookies”, we were able to continue through the Intune Company Portal enrollment process successfully.