Sharefile API List all Users with access to Folder

552 Views Asked by At

With the Sharefile API, is there a way to list all users who have access to a certain folder given a folder ID? Or given a user ID, is there a way to list the folders they have access to?

1

There are 1 best solutions below

0
On BEST ANSWER

This should get you the list of users that have access to some folderId (this is with the C# SDK, other SDKs should be similar):

string folderId;
ShareFileClient client;
...
var acls = await client.AccessControls.GetByItem(client.Items.GetEntityUriFromId(folderId)).ExecuteAsync();
foreach (var acl in acls.Feed)
{
    var user = acl.Principal;
    ...
}

I don't think the inverse is possible (getting a list of folders a particular user has access to).