Which object stores Content Library-Members list?

I need to find if current logged in user has just read(Viewer) access to a Library or write(Admin/Author) access.

  • Did you ever figure this out?
    – NSjonas
    Jan 7, 2015 at 2:44

3 Answers 3


Update: There isn't currently an object exposed with the ContentWorkspace Member details as configured against the Library.

Screenshot of the Members section from the UI:

enter image description here

I believe a SOQL query against ContentWorkspace will only return records that the current user has access to. However, this won't indicate the level of access.

Consider promoting the idea: workspace permissions

I would start with ContentWorkspaceDoc.IsOwner.


Read only. Indicates whether the library owns the document and determines permissions for that document (true) or not (false). Documents can belong to more than one library, but only one library owns the document and determines its permissions.

The Data Model diagrams can be useful here.

Salesforce Content Objects Data Model

  • can you help me out, which object can i query to get library's member permission. is it possible to get a library member permission programmatically.
    – Ankuli
    Sep 26, 2014 at 11:36
  • 1
    @Ankuli I'd ask a new question on the site so that it can be handled correctly. Sep 27, 2014 at 9:07
  • This doesn't really answer the question. @Ankuli did you ever solve this? I need the same thing.
    – NSjonas
    Jan 7, 2015 at 2:35

As on today (Spring'2017), Salesforce stores Content Library Members in ContentDocumentLink Object.

Let's say you upload a file under any record or chatter, the file reference is retrieved from ContentDocument object. ContentDocument represents the library in Salesforce CRM Content or Salesforce Files.

Based on the ContentDocumentId, you can retrieve the ShareType and LinkedEntityId from ContentDocumentLink object.

SELECT Id, ShareType, LinkedEntityId, Visibility
FROM ContentDocumentLink 
WHERE ContentDocumentId = '069q00000001jv0'



Required. The permission granted to the user of the shared file in a library. This is determined by the permission the user already has in the library. This field is available in API version 25.0 and later.


Viewer premission. The user can explicitly view but not edit the shared file.


Collaborator permission. The user can explicitly view and edit the shared file.


Inferred permission. The user’s permission is determined by the related record. For shares with a library, this is defined by the permissions the user has in that library.


ID of the linked object. Can include Chatter users, groups, records (any that support Chatter feed tracking including custom objects), and Salesforce CRM Content libraries.


Specifies whether this file is available to all users, internal users, or shared users. This field is available in API version 26.0 and later. Visibility can have the following values.

AllUsers—The file is available to all users who have permission to see the file.

InternalUsers—The file is available only to internal users who have permission to see the file.

SharedUsers—The file is available to all users who can see the feed to which the file is posted. SharedUsers is used only for files shared with users, and is available only when an org has private org-wide sharing on by default. The SharedUsers value is available in API version 32.0 and later.

For more information, refer ContentDocumentLink


Since API v40.0 there is a ContentWorkspaceMember which looks to be exactly what is needed. https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contentworkspacemember.htm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .