function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Access to Profile object without "View setup and configuration" permission?

Hi all,


I came across an issue today while testing on one of the projects. We are making api calls from flex, we had to modify the code for support to "Platform license" users, but I noticed that I cannot query Profile if "View setup and configuration" permission is disabled for a user.


In our case, the only reason we want to query from Profile is to get the current user's license type, giving them permission to setup area for that wouldn't be feasible.


Is there any work around? Or any other way where I can get a user's license type without a need to query his profile? Please help me, it's urgent.


This is the error I get once I disable the permission : "Invalid column "Profile" on User entity.

And this is the query I am having here :


Select Profile.UserLicenseId, ProfileId From User Where Id = userinfo.getUserId()