Andre Erwanto
Jan 09, 2019
5:21 pm

Upgrading WP to KNOX Workspace - java.lang.SecurityException: Profile is not a knox premium user 10 ContectInfo.uid 1010304


I need an urgent help, I'm following tutorial in:

to provision PO (success) then activate KPE (success) then upgrade PO to KNOX Workspace and try some KNOX policy.

I'm following the tutorial and all good until I try to: calling KNOX Policy --> in this case is set camera policy:

the high level process is like this:

  1. activate PO --> success
  2. Go to Work profile, and run the agent (the agent will be duplicated to work profile)
  3. activate KPE --> Success
  4. trigger / set camera policy
  5. Toggle container Camera --> failed
    it said "java.lang.SecurityException: Profile is not a knox premium user 10 ContectInfo.uid 1010304"

I'm running/Testing on: Note 9 (N960F) -- Build No: N960FXX2ARK3 -- Android 8.1.0 -- KNOX Version 3.2 -- KNOX API Level 26

What possibly went wrong here?

I share my overall code here:

Please let me know where am I missed.


thank you and appreciate the helps!

Updated: Jan 09, 2019 5:42 pm

Jay H.Samsung SEAP Moderator
Jan 17, 2019
2:11 am

Hi Andre,

You are seeing that error because your Android for Work profile needs to be upgraded to a Knox workspace before you can call setCameraEnabled() API. The profile is upgraded to Knox workspace when you activate a license. But in this case, there are two missing permissions preventing that from happening:

<uses-permission android:name="" />
<uses-permission android:name="" />

Once you add this to your manifest file and rebuild your app, your workspace should be upgraded to a container when activating the license. 



Mattia Pagini
Feb 06, 2019
4:15 pm

I had the same problem.
This is not documented in Step 6 of tutorial at this link:

At the end only adding the permissions reported by Jay it worked fine

Updated: Feb 06, 2019 at 4:17 pm


Hi Mattia,

Thank you for bringing this to our attention. We will update this guide to reflect the corrections Jay mentioned above. 

Best regards,


Mikayla N.Feb 06, 2019 at 5:14 pm