Activity Forums Salesforce® Discussions Salesforce API describe SObjects permissions?

  • Salesforce API describe SObjects permissions?

    Posted by Christiana on July 26, 2017 at 10:43 am

    We've an app that permits a person to connect to Salesforce and import records the use of OAUTH. Works satisfactory for Dev edition customers, but business enterprise version users now and again get a 401 Forbidden when the app makes a name to explain after they may be correctly logged in.

    I did control to discover this nugget in Saleforce's documentation for describeSObjects() that asserts:

    Your purchaser utility ought to be logged in with enough access rights to retrieve metadata about your company’s records.
    Does anybody realize what precisely those sufficient get right of entry to rights are? For enterprise edition users, does the Salesforce admin need to provide unique permissions to the person, in order that person can retrieve metadata?

    ns

    Achintya replied 4 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Achintya

    Member
    August 27, 2019 at 11:48 am

    Apex classes and triggers run in system mode. Classes and triggers have no restrictions on dynamically looking up any sObject that is available in the org. You can generate a map of all the sObjects for your org regardless of the current user’s permission unless you are executing anonymous Apex.

    User permissions matter when you execute describe calls in an anonymous block. As a result, not all sObjects and fields can be looked up if access is restricted for the running user. For example, if you describe account fields in an anonymous block and you don’t have access to all fields, not all fields are returned. However, all fields are returned for the same call in an Apex class.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos