Enrollment Failed

Solved
S
SteeveP
Sogesma/Logesma

Hello everyone.

I had to reinstall one of our device today.

And each time i try to re-enroll it, i get message"Enrollment Failed , please retry or contact your system administrator"

I checked the log, and only get this


[2023-01-25 14:47:51.827] ERROR [Android RESTful Enrollment] (196): Unhandled exception on POST https://MYSERVERIP/mc/enrollments/android {"AddDeviceRuleId":null,"EnrollmentPolicyPin":null,"AddDeviceRuleTag":"33FC8A72-5987-F82A-2C1E-1C089AA74E1F","AcceptedTermsAndConditionsUrl":null,"IsDeviceGmsCertified":true,"IsOemAgent":false,"Snapshot":{"DeviceName":null,"Info":{"Uuid":"a848b49e-2ab6-419d-98e8-8e509ce15112"},"SafetyNetAttestationResponse":null,"ApiLevel":28,"OSType":800,"DeviceFirmwareVersion":null,"Ip_And_IpType":{"Ip":"MYDEVICEIP"},"ImsiNumber":"","Esn":"35239311025117","Iccid":"","PhoneNumber":"","Mac":"d04e50f8097d","SerialNumber":"35239311025117","Model":"MEMOR 10","Oem":"Datalogic","PersonalizedDeviceName":"MEMOR 10","LockScreenMessage":null,"Id":"35239311025117","BluetoothMac":"","WifiMac":"d04e50f8097d","HardwareSerial":"S21H00413","Imei":"352393110251173","SupportedApis":{"ActiveMdmIds":[1040],"RcId":"813"},"FeatureList":{"AgentFeatures":[1,2,3,4]}},"IsDuasSupported":false}
System.IndexOutOfRangeException: AndroidEnrollmentPolicyKindId
   à System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
   à System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
   à System.Data.SqlClient.SqlDataReader.get_Item(String name)
   à Soti.Data.SqlClient.TransformingDataReader.get_Item(String name)
   à Soti.MobiControl.EnrollmentPolicy.Android.Implementation.Providers.Implementation.AndroidEnrollmentPolicyProvider.AndroidEnrollmentPolicyToRecord(IDataRecord record)
   à Soti.Data.SqlClient.Command.<>c__DisplayClass19_0`1.<ExecuteRecord>b__0(IDataReader reader)
   à Soti.Data.SqlClient.Command.<>c__DisplayClass26_0`1.<ExecuteReader>b__0(SqlCommand sqlCommand)
   à Soti.Data.SqlClient.Command.Execute[T](Func`2 handler)
   à Soti.MobiControl.EnrollmentPolicy.Android.Implementation.AndroidEnrollmentPolicyService.GetAndroidEnrollmentPolicy(Int32 androidEnrollmentPolicyId)
   à Soti.MobiControl.EnrollmentPolicy.Android.Implementation.AndroidEnrollmentPolicyCacheService.GetAndroidEnrollmentPolicy(Int32 androidEnrollmentPolicyId)
   à Soti.MobiControl.DeviceEnrollment.Android.Implementation.EnrollmentManagementService.GetEnrollmentPolicyInfo(AndroidDeviceSnapshot deviceSnapshot)
   à Soti.MobiControl.DeviceEnrollment.Android.Implementation.EnrollmentManagementService.Enroll(AndroidDeviceSnapshot deviceSnapshot)
   à Soti.MobiControl.DeviceEnrollment.Android.Web.Implementation.AndroidAgentEnrollmentController.Enroll(EnrollmentRequest enrollmentRequest)
   à lambda_method(Closure , Object , Object[] )
   à System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
   à System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)

2 years ago
SOTI MobiControl
ANSWERS
AW
Adam Williams
2 years ago

Hi SteeveP

Out of interest, how are you enrolling?

We are testing out a new process here, enrollment via QRCode and we are experiencing some very odd behaviour, but different from what you're are seeing.

We are enrolling (Panasonic, Android11) via QRCode, Android Enterprise Fully managed.

When going through the GoogleSetupWizard, the process appears to be crashing mid procedure and returning the device back to the blue welcome screen. When looking at MC we can see the device had registered with the server but didnt recieve a payload.

Adam

S
SteeveP
2 years ago

Hi Adam,

We got like...300 Devices enrolled atm

To be honest..it work pretty well most of the time.

All devices Are Datalogic Memor 10 , so i go through this to generate the QR Code to enroll Them.

https://datalogic.github.io/aeqr/

Never had big issues with enrolling that way

S
SteeveP
2 years ago

Related or not , it seems i can't access to Enrollment policies again.

Got a message saying the policies can't be found or i'm not allowed to..

MB

Hi,

when the Device was Renrolled and not removed from MobiControl i had the Same Problem.

We only had the Problem not when:

- the Device what should be reenrolled is in the Folder as the MC Enrollmend Code is configured

- we deleted the Deivce and select als Remove the Certificate

Did you made a select if the MAC d04e50f8097d is already existing ?

Check if the "Search Index Files" are on 100% in the Settings.

S
SteeveP
2 years ago

Hi,

Did both wit no more luck

Also tried with a script provided in the past to check directly into the DB with device ID...but same, already gone, nothing more left.

Seems the policie could be root of the problem...but how to correct that...Well..

Can't edit or even delete it ...not even create a new one...

MB

Hi Steeve,

is the the First Device with Android 10 what you are trying to enroll back to MobiControl?

What Version of MC you are Using?

What is the Firmware Version from the Memor 10 ?

S
SteeveP
2 years ago

Hi Marcus

No we got around 320 devices atm... and already had to re-enroll( tha'ts why i needed the script to correctly delete it in the past)

MC is in V.

Memor 10 for firmware 2.08.12

C
CDMOD@SOTI
2 years ago

Hi SteeveP,

Thank you for posting on SOTI Pulse.

Can you confirm if you have enough available license to re-enroll this device?

Also, have you tried enrollment via afw#mobicontrol?

Please ensure there is a strong network connection as the logs show 'null' for device details.

Lastly, try creating a new 'add device rule' and try enrolling with the newly created enrollment id.

If none of these work, do reach-out and create a case.

Kind Regards,

Technical Support, SOTI | Call Us | SOTI.net | Discussion Forum | Log a Case Online | Facebook | LinkedIn | Twitter |

S
SteeveP
2 years ago

Hi there,

Sorry for Delay

right after this we had a huge crash and had to go throught Rollback and all...

I think this was prior to it as the Policie wasn't usable anymore and wouldn't been able to create new one.

Had to restore a previous backup of DB , reinstall only the first part of mobi control...then i would basically had access to the policie and would be able to delete it.

After that...Reinstalled the last part of mobicontrol and so far...it seems ok.

Thanks for your following.

Steeve

Solution
C
CDMOD@SOTI
2 years ago