I want to follow a record via chatter api for a specific user, it's possible for users to make other users to follow a record, specifically I use this method:
ConnectApi.ChatterUsers.follow(null, userId, caseId);
When I run from system administrator everything works great, but once I run from a different profile it results in this error:
System.NoAccessException: Insufficient Privileges: You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.
I have the following options checked in profile settings:
- Chatter Internal User
- Moderate Chatter
- Manage Chatter Messages and Direct Messages
- Manage Unlisted Groups
- Create and Own New Chatter Groups
And I checked profile has view/ edit access of the target record.
Does anyone knows what permissions are missing? is it a bug?