android-management-api

What is the use for signinEnrollmentToken?


I created an enterprise passing the SigninDetailList like this

   List<SigninDetail> signinDetailList = new ArrayList<>();
   SigninDetail signinDetail = new SigninDetail();
   signinDetail.setAllowPersonalUsage("PERSONAL_USAGE_DISALLOWED");
   signinDetail.setSigninUrl("https://****.com.br");
   signinDetailList.add(signinDetail);
   enterprise.setSigninDetails(signinDetailList);

when I create the enterprise it returns for me an signinEnrollmentToken, but if i use this token in the url or in the Android Device Policy, it gives me an error saying that is not possible to configure a work profile. Can someone help?

If i read the documentation correctly, after the user input the signinEnrollmentToken it would redirect him to the signinurl and after he logged in i would update his policy and redirect it for the url with the enrolmenttoken.


Solution

  • The Sign-In URL method of provisioning uses the 'signinEnrollmentToken', which is an enterprise-wide enrollment token used to trigger a custom sign-in flow.

    Based on the error message you are receiving, it looks as though this device has already completed setup as a personally-owned device. If you are looking to support Work Profiles on a personally-owned device, you would need to set ‘allowPersonalUsage’ to ‘PERSONAL_USAGE_ALLOWED’. This would allow the creation of a work profile and correct the error you are encountering.

    Company-owned devices must be provisioned on a new or factory reset device. To claim ownership of the device in question, a factory will need to be performed and device provisioning will need to be initiated during initial setup (via QR Code, NFC, etc.)

    Additionally, it is not advisable to use the Sign-In URL method of provisioning for dedicated devices.

    For more details, please review the Sign-In URL documentation here.