Why Service Account user cannot access table via web service?

Todd O
Tera Guru

I have a service account user that I want to be able to use for accessing a custom table via web service. I have granted this user the roles that I believe are needed for this but still, I get user unauthorized why trying to access this table via web service. Here are more details and any suggestions would be appreciated.

On my custom table, I have a role that is required to access. yes, I've also granted this role to my service account user.   In addition to this table level control role, I've granted this user the following roles:

rest_api_explorer

rest_service

web_service_admin

Still, my user is NOT able to access this table via web service. My own account works fine but that is because I'm an admin role. What role am I missing for my service account user? Thanks.

Todd

2 REPLIES 2

Patrick Schult2
Giga Guru

A good way to figure out if you've configured the security correctly is to impersonate the service account and verify it can see the table + columns in the UI. It sounds to me like you're going to be reading this table with REST (not SOAP), and the REST table API reflects the security you ordinarily get in the UI.



If the impersonation looks fine, please provide the exact error message that account is getting. Also make sure you put the correct authorization header into your request. I know that with a tool like Postman, for example, you can type in the credentials, but they're not actually placed into the request unless you press a button, perhaps giving you the impression that the creds were attached the request, when it reality they were not.


EDIT:     I'm sorry, I can find and impersonate this user. Please ignore my message below. I was searching based on user id but I see name is what works. Anyways, I did figure out that the user can access the table in question and create a new record via the UI. The service account still cannot access the table via web service from Visual Studio C# program. I will get as much further details as possible to help analyze root cause. Thanks.




Ignore original post below....


[Hi Patrick,


Thanks for input here. I tried the impersonate and I cannot even select this service account user. My own user is an admin so I went to System Security -> Users Groups -> Users and searched for this user account. I see that it's listed and it's active with the roles I mentioned in my original post.   It's not locked out either.



Everything looks normal about it but again I cannot impersonate it. Is there something basic I'm missing? Thanks.


Todd]