You need to sign in to do that
Don't have an account?
![Gabriel Costa 13 Gabriel Costa 13](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Custom Object not showing on Rest API
Hi,
I have custom objects that aren't showing when I make requests via REST api with server-to-server credentials.
If I make requests to https://MYORG.my.salesforce.com/services/data/v56.0/sobjects using the oauth2 token that is generated via logining my account in the popup shown, I can see all the objects. But when I use the token generated by server-to-server authentication (https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_client_credentials_flow.htm&type=5) the custom objects are not shown.
What could be the reason? The 'Run as' user that is used for generate the token is different than the user that I use in the web popup to login, this user has the API Only permission and my user has PB Superuser. Could it be that? If so, where should I allow this user to see these custom objects? From what I searched the permissions seems to be the same that those that I have and I cannot put any other profile besides API Only in the 'Run as' user to server-to-server auth.
I'm also making this request that returns success with the token generated via my personal user but returns error with the token via server-to-server.
Request: https://MYORG.my.salesforce.com/services/data/v56.0/query?q=SELECT FIELDS(ALL) FROM pba__Property__c WHERE RecordTypeId='ID' LIMIT 200
Error:
"message": "\nSELECT FIELDS(ALL) FROM pba__Property__c WHERE RecordTypeId='ID'\n ^\nERROR at Row:1:Column:25\nsObject type 'pba__Property__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.",
"errorCode": "INVALID_TYPE"
I have custom objects that aren't showing when I make requests via REST api with server-to-server credentials.
If I make requests to https://MYORG.my.salesforce.com/services/data/v56.0/sobjects using the oauth2 token that is generated via logining my account in the popup shown, I can see all the objects. But when I use the token generated by server-to-server authentication (https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_client_credentials_flow.htm&type=5) the custom objects are not shown.
What could be the reason? The 'Run as' user that is used for generate the token is different than the user that I use in the web popup to login, this user has the API Only permission and my user has PB Superuser. Could it be that? If so, where should I allow this user to see these custom objects? From what I searched the permissions seems to be the same that those that I have and I cannot put any other profile besides API Only in the 'Run as' user to server-to-server auth.
I'm also making this request that returns success with the token generated via my personal user but returns error with the token via server-to-server.
Request: https://MYORG.my.salesforce.com/services/data/v56.0/query?q=SELECT FIELDS(ALL) FROM pba__Property__c WHERE RecordTypeId='ID' LIMIT 200
Error:
"message": "\nSELECT FIELDS(ALL) FROM pba__Property__c WHERE RecordTypeId='ID'\n ^\nERROR at Row:1:Column:25\nsObject type 'pba__Property__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.",
"errorCode": "INVALID_TYPE"
Is this 'pba__Property__c' object based on packag, Do you have access package?
Thanks,