Lists the shared folders within a specified folder or the current directory in your Keeper vault.
DotNet CLI
Command:sf-list
Example:
MyVault>sf-list# Shared Folder UID Name # Records # Users------------------------------------------------------------------------1shared_folder_uidTest-Shared-Folder111
DotNet SDK
Function:
varsharedFolders=vault.SharedFolders;
Power Commander
Command:Get-KeeperSharedFolder
Flag:
-Uid : Uid of the Shared Folder
-Filter : Used to filter the shared folders.
Example:
Python CLI
Command:list-sf
Options:
pattern : Pattern of the title or UID of the shared folder.
-h, --help : show this help message and exit
--format : Specifies the output format of the list-sf command. The available options are:
table: The Output will be displayed in table format. By default, the output will be in table format.
Example: --format table
csv: The Output will be displayed in csv format.
Example: --format csv
json : The Output will be displayed in json format.
Example: --format json
--output : Users can use this flag to store the output in a file. This flag should not be used when the output format is set to table (--format table).
Example: --output <file_name>
--verbose, -v : verbose output
Example:
Python SDK
Function:find_shared_folders
Example:
Share Folder Command
Changes sharing permissions on classic shared folders. Use it to grant or remove users, teams, and records.
Notes:
Classic shared folders only. Not NSF or Keeper Drive nested folders.
Invitations: If a user has no Keeper account, the SDK sends an invite. Share again after they accept.
Chunking: The CLI chunks large user and record sets at 999 per batch. The SDK send_requests call chunks at 999 requests per API call.
folder : Required. Accepts one or more shared folder paths, names, or UIDs. Use * to target all shared folders in the vault.
Action:
-a, --action : grant or remove. Default is grant.
grant adds or updates access.
remove revokes user, team, or record access.
Users and teams:
-e, --email : Repeatable. Accepts:
user@example.com to grant or remove a user.
<team_name> or <team_uid> to grant or remove a team.
@existing or @current to target all users and teams already in the folder.
* to update default folder account permissions.
Records:
-r, --record : Repeatable. Accepts:
Record title or UID.
@existing or @current to target all records in the folder.
* to update default record permissions.
Account permissions:
-p, --manage-records : on or off. Lets the user or team add, remove, or edit records in the folder.
-o, --manage-users : on or off. Lets the user or team add or remove other users and teams.
Record permissions:
-d, --can-edit : on or off. Lets shared records be edited.
-s, --can-share : on or off. Lets shared records be re-shared.
Expiration:
--expire-at : never or an ISO datetime in yyyy-MM-dd or yyyy-MM-dd hh:mm:ss format.
--expire-in : never or <N>[(y)ears|(mo)nths|(d)ays|(h)ours|(mi)nutes].
Expiration only applies with --action grant.
If omitted, the share does not expire.
Rotate on expiration:
-roe, --rotate-on-expiration : Rotates pamUser passwords when share access expires.
Other:
-f, --force : Declared on the command. It ignores default folder permissions on initial share. It is not wired into the current SDK CLI execute logic.
Examples:
Python SDK
Example:
JavaScript SDK
Function:listSharedFolders
Shared Folder - Change Record Permissions Command
Allows users to change the permissions of records within a shared folder. Users can add or revoke permissions for individual records as needed.
DotNet CLI
Command:sf-record
Flag:
-r, --record : The record name or record UID of the item that needs to be shared within the shared folder.
-s, --can-share : A Boolean value (true or false). If true, the user has share permission. If false, the edit permission will be removed.
-e, --can-edit : A Boolean value (true or false). If true, the user has edit permission. If false, the edit permission will be removed.
--expire-at : Expire share at ISO time: YYYY-MM-DD HH🇲🇲SS
--expire-in : Expire share in period: [N]mi|h|d|mo (Minutes / hours / days / months)
--help : Display this help screen.
--version : Display version information.
folder name (pos. 0) : Required. folder name
Example:
DotNet SDK
Function:ChangeRecordInSharedFolder
Example:
Power Commander
Command : Set-KeeperSharedFolderRecordPermission
Alias:ksfr
Flags:
-SharedFolder : UID, name, or object containing the shared folder UID/name.
-Record : UID or object containing the record UID.
-CanEdit : Whether shared-folder members can edit the record. Accepts true, false, 1, or 0.
-CanShare : Whether shared-folder members can re-share the record. Accepts true, false, 1, or 0.
-ExpireIn : Sets the record permission expiration relative to the current time, such as 30d or 1h.
-ExpireAt : Sets an absolute expiration date and time.
-RotateOnExpiration : Rotates the record password when the permission expires. Requires an expiration and a shared folder containing a configured pamUser rotation record.
-WhatIf : Previews the permission change without making changes.
-Confirm : Requests confirmation before changing permissions.
Example:
Python CLI
Command: record-permission
Parameters:
-a, --action Grant or Revoke (required)
folder Shared folder uid to which the changes need to be applied (required)
Options:
--dry-run Display the permissions changes without committing them
--force Apply permission changes without any confirmation
-R, --recursive Apply permission changes to all sub-folders
--share-record Change a records sharing permissions
--share-folder Change a folders sharing permissions
-s, --can-share Set record permission: can be shared
-d, --can-edit Set record permission: can be edited
--can-edit or --can-share is required
Example:
Python SDK
Command :
Add user or team to Share Folder Command
Add a user or team to a shared folder with specified access permissions.
My Vault> list-sf
# Shared Folder UID Name
--- ---------------------- -----------------------------------------
1 shared_folder_uid Test Example Folder
share-folder -e user@example.com -a grant "My Shared Folder"
share-folder -e user@example.com -d on -s off -a grant IQ_folderUid
share-folder -e "Dev Team" -p on -o off -a grant IQ_folderUid
share-folder -e user@example.com -r "Server Login" -r IQ_recordUid -a grant IQ_folderUid
share-folder -e @existing -p on -a grant IQ_folderUid
share-folder -e '*' -p on -o off -r '*' -d on -s off -a grant IQ_folderUid
share-folder -e user@example.com --expire-in 7d -a grant IQ_folderUid
share-folder -e contractor@example.com --expire-in 7d -roe -a grant IQ_folderUid
share-folder -e user@example.com -a remove IQ_folderUid
share-folder -e user@example.com -r IQ_recordUid -a remove IQ_folderUid
share-folder -e user@example.com -a grant '*'
My Vault> sf-record record_uid
# Record Title Record UID Can Edit Can Share Expiration
--- ------------- ---------------------- -------- --------- ----------
1 ABC record_uid X X
2 Gmail Account record_uid X X
3 Gmail Account record_uid X X
My Vault> sf-record folder_uid --record=record_uid --expire-in=30mi
My Vault> sf-record BRvqCEzmFM9rVqkmpeGs6A
# Record Title Record UID Can Edit Can Share Expiration
--- ------------- ---------------------- -------- --------- ----------------
1 ABC record_uid X X 03-11-2025 18:08
2 Gmail Account record_uid X X
3 Gmail Account record_uid X X
public async Task ChangeRecordInSharedFolder(string sharedFolderUid, string recordUid, IRecordShareOptions options)
My Vault> record-permission -a grant --share-record -s -d shared_folder_uid
Request to GRANT "Can Edit" & "Can Share" permission(s) in "my_share" folder only
from keepersdk.vault import share_management_utils
result = share_management_utils.update_record_permissions(
vault=vault,
action=action,
can_share=can_share,
can_edit=can_edit,
folder_uid_or_path=folder_uid_or_path,
recursive=recursive,
share_record=share_record,
share_folder=share_folder,
dry_run=dry_run,
sync_after=sync_after,
)
public bool PutUserToSharedFolder(string sharedFolderUid, string userId, UserType userType, IUserShareOptions options = null)
{
if (!TryGetFolderByUid(sharedFolderUid, out var f))
{
BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" not found");
return false;
}
switch (f.FolderType)
{
case FolderType.UserFolder:
BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" is not a shared folder");
return false;
case FolderType.SharedFolderFolder:
BatchLogger?.Invoke(Severity.Information, $"Folder UID \"{sharedFolderUid}\" is a shared subfolder folder. Selecting a parent shared folder.");
sharedFolderUid = f.SharedFolderUid;
if (!TryGetFolderByUid(sharedFolderUid, out f))
{
BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" not found");
}
if (f.FolderType != FolderType.SharedFolder)
{
BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" is not a shared folder");
}
break;
}
SharedFolderMember pendingMembership = null;
if (_sharedFolderMembership.TryGetValue(sharedFolderUid, out var currentSharedFolder))
{
currentSharedFolder.TryGetValue(userId, out pendingMembership);
}
if (pendingMembership != null)
{
pendingMembership.IsRemove = false;
pendingMembership.Options = options;
return true;
}
pendingMembership = new SharedFolderMember
{
UserId = userId,
UserType = userType,
IsRemove = false,
Options = options,
};
if (currentSharedFolder == null)
{
currentSharedFolder = new Dictionary<string, SharedFolderMember>();
_sharedFolderMembership.Add(sharedFolderUid, currentSharedFolder);
}
currentSharedFolder.Add(userId, pendingMembership);
return true;
}
function shareFolder(
auth: Auth,
storage: InMemoryStorage,
input: ShareFolderInput
): Promise<ShareFolderResult> {
const resolved = resolveFolder(storage, input.folder)
if (!resolved) {
throw new KeeperSdkError(`Folder "${input.folder}" was not found.`, 'folder_not_found')
}
if (resolved.kind === FolderKind.UserFolder) {
throw new KeeperSdkError(
`"${resolved.displayName}" is a personal folder. Only shared folders can be shared.`,
'not_a_shared_folder'
)
}
r