I am running a SOQL query through REST API.
The entire process flows as follows:
Whenever user tries to access our site from Salesforce I retrieve the Salesforce Session ID through SAML.
With the session_id I query back Salesforce Using REST API.
def find_by_soql(query,session_id) cmd = "curl #{APP_CONFIG[:salesforce_api_url]}query/?q=#{query}" cmd << " -H 'Authorization: Bearer #{session_id}'" res = System(cmd) return res end
Where query string would look like (Before HTML escaping) :
select my_sf_ns__XYZ__c
from my_sf_ns__XYZ_TAB__c
where id in (select my_sf_ns__XYZ_TAB__c
from my_sf_ns__ABC_XYZ__c
where my_sf_ns__ABC__c in ('0019000000PmMisAAF','0019000000QKhjWAAT') )
This query works perfectly fine for System Administrator Profile but fails for a Profile which is Cloned from System Administrator. Both the Profiles has access to XYZ_TAB , ABC_XYZ and ABC Objects.
I couldn't find out what I am missing from configuration side. But I have few doubts on the Salesforce behaviour.
Please help me understanding whether these may be the reasons for failure.
1.REST API and SOQL
Is there any profile level restriction on Salesforce REST API to run SOQL ?
Is that API Access for new Profile will take some time to activate ?
2.Developer Org and SOQL
I am testing this in the same Platform where I am developing the Managed package. Will these be an issue causing Custom Objects be visible only to System Administrator on Developer Org ? Because whenever I install this manage package on other Orgs it asks for Profile to allow and all other access control options.
If so, is there a way to enable it for these profiles too on Developer Org ?