Sharing Commands

This page gives information of commands related to sharing records and shared folders

Overview

This is the set of commands which we use related to sharing with user

Share Folder Command

This command can be used to grant or revoke access of a shared folder to a user. The user can be given permissions to manage users and records in the folder and sharing and editing permissions for those records. The access can be limited for a time duration or upto a specific date to be automatically revoked.

DotNet CLI

Command: sf-user

Flag :

  • --user : The user account email, team name, or team UID that needs to be shared.

  • --delete (Default: false) : Remove the user or team from shared folder

  • -r, --manage-records : Set a boolean value for 'Can Manage Records' permission: true if user can manage record and false to remove can manage records permissions from the shared folder.

  • -u, --manage-users : Set a boolean value for 'Can Manage Users' permission: true if user can manage users or false to remove can manage uses permissions from the shared folder.

  • --expire-at : Expire share at ISO time: YYYY-MM-DD HH:mm:SS

  • --expire-in : Expire share in period: [N]mi|h|d|mo|y

  • --help : Display this help screen.

  • --version : Display version information.

  • folder name (pos. 0) : Name of the folder to be shared. This is a required positional argument placed at position 0 after the command

Example:

My Vault> sf-user "Test-Example-folder/Example-shared-folder" --user "[email protected]" -r true -u true
DotNet SDK

Function:

public async Task PutUserToSharedFolder(string sharedFolderUid,
            string userId,
            UserType userType,
            IUserShareOptions options)

Arguments:

  • sharedFolderUid : The Uid of the share-folder.

  • userId : The userId of the user or team.

  • UserType : The type of users either User or Team.

  • IUserShareOptions : To add or remove the permissions of the shared folder. Options are -

    • Bool ManageRecords

    • Bool ManageUsers

    • DateTimeOffset Expiration

Power Commander

Command: Grant-KeeperSharedFolderAccess

Aliases:kshf

Flags:

  • -SharedFolder : Uid of Shared Folder

  • -User or -Team : User email or Team

  • -ManageRecords : Permission

  • -ManageUsers : Permission

Example:

PS > Grant-KeeperSharedFolderAccess -SharedFolder shared_folder_uid -User "[email protected]" -ManageRecords
User "[email protected]" has been added to shared folder "Example Shared Folder" 
Python CLI

Command: share-folder

Parameters: Required

  • -e, --email : Email of user to give access to

  • folder : <FOLDER_UID> or path of shared folder

Options:

  • -a, --action : Grant or remove- permission set for shared folder

  • -s, --can-share : Allow user to share record

  • -d, --can-edit : Allow user to edit record

  • -p, --manage-records : Give user permission to manage records in shared folder

  • -o, --manage-users : Give user permission to manage users of shared folder

  • --expire-at : Share expiration: "never" or ISO date-time "YYYY-MM-DD hh:mm:ss"

  • --expire-in : Share expiration: "never" or period <NUMBER>[(m)inutes | (h)ours | (d)ays | (y)ears]

  • --dry-run : Show the permission changes without applying them

  • -f, --force : Apply permission changes ignoring default folder permissions

  • -r, --record : <RECORD_UID>, record names, @existing for all record in folder

Example:

My Vault> share-folder -a='grant' -e='[email protected]' -s='on' -d='on' -p='on' -o='on' --expire-in=30d shared_folder_uid
User share '[email protected]' added
Python SDK

Command : Coming Soon

One Time Share Create Command

This command can be used to create share-links of records in vault for sharing credentials or record information with a user externally. The link can be opened on one device/browser only and can be reopened only on that device/browser till the expiration of the link

DotNet CLI

Command: one-time-share

Flags:

  • --client : One-Time Share action name create . This is a required positional argument at position 0 after the command.

  • --expire : Expire share in [(m)inutes|(h)ours|(d)ays. Only used with argument create .

  • --help : Display this help screen.

  • --version : Display version information.

  • value pos. 0 : This is a required KSM command that specifies the action to perform. It is a positional argument that must be placed at position 0 immediately after the command. Accepted values are:

    • create – To create a new one-time-share

  • value (pos. 1) : Required. The Record UID or path to be shared. This is a positional argument placed at position 1 immediately after the command.

Example:

My Vault > one-time-share create record_uid --expire 2m
URL: https://keepersecurity.com:443/vault/share#asdfsadf
DotNet SDK

Function:

public static async Task<string> CreateExternalRecordShare(this VaultOnline vault, 
        string recordUid, 
        TimeSpan expireIn, 
        string shareName = null)

Arguments:

  • vault : Used with the Vault Context.

vault.CreateExternalRecordShare(record.Uid, TimeSpan expireIn)
  • recordUid : Uid of the record which needs to be shared.

  • TimeSpan : Object of the TimeSpan class used to set the expiration time of the record.

  • shareName : Name of the one-time-share.

Power Commander

Command: New-KeeperOneTimeShare

Aliases: kotsn

Flags:

  • -Uid : Uid of Record

  • -ExpireIn : One Time Share expires time in minutes

  • -ExpireAt : One Time Share expires time in date format

  • -ShareName : One Time Share record name

Example:

PS > New-KeeperOneTimeShare -Uid record_uid -ExpireIn 5 -ShareName "Example Share" 
https://keepersecurity.com:443/vault/share#qwertyuiopasdfghjklzxcvbnm
Python CLI

Command: share-create

Parameters:

  • record : <RECORD_UID> or path of records for which share URL is to be created

  • -e, --expire : Timeout period for the share-url. Link will not work after the duration has passed. Max period that can be set is 6 months or 182 days

Options:

  • --name : Name of the share URL

  • --editable : Allow user to edit the shared record

  • --output : Destination for the share URL (Clipboard or console/standard output)

Example:

My Vault> share-create --name='share_record' -e=30d record_uid
https://keepersecurity.com/vault/share#asdfsdjkkadsfdasfasdf
Python SDK

Command : Coming Soon

One Time Share List Command

This command is used to list the one-time-shares created for a record or folder. The command displays the record/folder UID, share name, share id, create date, access date and expiration date along with status of the link as generated, accessed or expired.

DotNet CLI

Command: one-time-share

Action:

This is a required KSM command that specifies the action to perform. It is a positional argument that must be placed at position 0 immediately after the command. Accepted values are:

  • list – To display a list of one-time share URLs for the record.

Flags:

  • value pos. 1 : Required. The Record UID or path to be shared. This is a positional argument placed at position 1 immediately after the command.

  • --client : One-Time Share action name list. This is a required positional argument at position 0 after the command.

  • --help : Display this help screen.

  • --version : Display version information.

Example:

My Vault> one-time-share list record_uid  --client "Example Share" 
  #  Record UID              Record Title    Share Name   Generated          Opened             Expires          
---  ----------------------  -------------   -----------  -----------------  -----------------  -----------------    
  1  record_uid              Example Record  Share_name   8/28/2025 5:58 PM  8/28/2025 5:58 PM  8/28/2025 6:00 PM
DotNet SDK

Function:

public static async Task<ExternalRecordShare[]> GetExernalRecordShares(
    this VaultOnline vault, 
    string recordUid
)

Arguments:

  • vault : Used with the Vault Context.

Vault.GetExernalRecordShares(record.Uid)
  • recordUid : UID of the record for which the list of one-time shares should be displayed.

Power Commander

Command: Get-KeeperOneTimeShare

Aliases: kotsg

Flags:

  • -Uid : Uid of Record

Example:

PS > Get-KeeperOneTimeShare record_uid

RecordUid              RecordTitle   Owner Users Folders
---------              -----------   ----- ----- -------
record_uid             Example Record         1       1
Python CLI

Command: share-list

Parameters:

  • record : <UID> or path of record/folder

Options:

  • -v, --verbose : Show the entire output if share id is long it gets trimmed.

  • -a, --all : Show all one-time-share including expired

  • -R, --recursive : Traverse recursively through subfolders

  • --format : Output format - table, json, csv

Example:

My Vault> share-list -v record_uid

Record UID               Share Link Name    Share Link ID                                       Generated            Opened    Expires              Status
----------------------   -----------------  --------------------------------------------        -------------------  --------  -------------------  --------
record_uid                                  Share_link_uid                                      2025-08-06 16:54:11            2025-08-06 17:24:11  Expired
Python SDK

Command : Coming Soon

One Time Share Remove Command

This command is used to delete one time share links for a record or folder.

DotNet CLI

Command: one-time-share

Flags:

  • --client : One-Time Share action name delete. This is a required positional argument at position 0 after the command.

  • --help : Display this help screen.

  • --version : Display version information.

  • value pos. 0 : This is a required KSM command that specifies the action to perform. It is a positional argument that must be placed at position 0 immediately after the command. Accepted values are:

    • delete – To remove an one-time-share

  • value pos. 1 : Required. The Record UID or path to be shared. This is a positional argument placed at position 1 immediately after the command.

Example:

My Vault> one-time-share delete record_uid  --client "Example Share"  
DotNet SDK

Function:

public static async Task DeleteExernalRecordShares(
    this VaultOnline vault, 
    string recordUid, 
    IEnumerable<string> clientId
)

Arguments:

  • VaultOnline : Used with the Vault Context.

var shares = (await context.Vault.GetExernalRecordShares(record.Uid))
Vault.DeleteExernalRecordShares(record.Uid, 
    shares.Select(x => x.ClientId))
  • ClientId : Client ID of the shares of the record ID.

Power Commander

Command: Remove-KeeperOneTimeShare

Aliases: kotsr

Flags:

  • -Uid : Uid of Record

  • -ShareName : List of Shared Name

Example:

PS > Remove-KeeperOneTimeShare -Uid record_uid  -ShareName "Example Share"                     
Python CLI

Command: share-remove

Parameters: Required

  • record : UID or Path of the record or folder

  • share : One-time share ID

Example:

My Vault> share-remove record_uid shared_link_uid
One-time share "share_link_uid" is removed from record "record_uid"
Python SDK

Command : Coming Soon

Last updated

Was this helpful?