java.lang.SecurityException: You need MANAGE_USERS permission to: query user


Android SDK 23 introduced a new way to handle permissions, so as a temporary workaround you can set it to build for SDK below 23. As a permanent solution you have to ask user during runtime for permissions with checkSelfPermission() or requestPermissions()


You need the permission android.permission.READ_EXTERNAL_STORAGE. Write on the Android Manifest


MANAGE_USERS has a protection level of signature|system, so your application must be signed with the platform key. Take a look on this for more information about it.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • UserManager getUserCount() (Jelly Bean)
    via Stack Overflow by Kedi
  • Fatal exception error
    via Stack Overflow by user2850116
  • Dealing with Download Listener in Android
    via Stack Overflow by Alok Kumar
  • securityexception
    via by Unknown author,
    • java.lang.SecurityException: You need MANAGE_USERS permission to: query user at android.os.Parcel.readException( at android.os.Parcel.readException( at android.os.IUserManager$Stub$Proxy.getUserInfo( at android.os.UserManager.getUserInfo( at android.os.UserManager.isManagedProfile(

    Users with the same issue

    franky li
    franky li8 times, last one,
    filipebatista8 times, last one,
    Hiren Amaliyar
    Hiren Amaliyar8 times, last one,
    Aravind86 times, last one,
    Indri Yunita
    Indri Yunita199 times, last one,
    229 more bugmates