Record Share Command

This Page adds more context to record related sharing commands

Overview

The following actions are supported by the share-record command

  1. grant - grants and changes permissions of a given record to given user.

  2. revoke - revoke current record share.

  3. transfer-ownership - transfers ownership to a given user.

  4. cancel - revoke all shares with user.

Share Record - Share Command

This command can be used to grant access of a record to a user. The user can be given sharing and editing permissions. The access can be limited for a time duration or upto a specific date to be automatically revoked.

DotNet CLI

Command: share-record

Action:

  • share : Share a record with a user

Flags:

  • -s, --share (bool, optional)

    • Allows the recipient to re-share the record with others.

    • Example: --share true

  • -w, --write (bool, optional)

    • Allows the recipient to modify the record.

    • Example: --write true

  • --expire-at (string, optional)

    • Sets a specific date/time when the share will expire.

    • Format: YYYY-MM-DD HH:mm:SS (ISO).

    • Example: c

  • --expire-in (string, optional)

    • Sets a relative expiration period for the share.

    • Format: mi|h|d|mo|y

      • mi = minutes

      • h = hours

      • d = days

      • mo = months

      • y = years

    • Example: --expire-in 7d (expires in 7 days)

  • -e, --email (string, required)

  • record (positional, required)

    • Record path or UID to be shared.

    • Example: MyPasswords/Bank or 9xL2c6aBc1234

Example:

My Vault> share-record share <uidaaabbcc11221uuuid> --write=true --share=true --expire-at "2025-09-30
 23:59:00" --email="[email protected]"
DotNet SDK

Function:

public async Task ShareRecordWithUser(
    string recordUid, 
    string username, 
    IRecordShareOptions options)

Arguments:

  • recordUid - This is UID of the record which is to be shared with user

  • username - Email of the user with whom we are sharing the record

  • IRecordShareOptions - Sharing options/permissions

  • IRecordShareOptions

    • CanEdit - Boolean - whether the user with whom we are sharing can edit the record we are sharing with them

    • CanShare - Boolean - whether the user with whom we are sharing can re-share the record we are sharing with them

    • Expiration - DateTimeOffset - Share duration for which the user will have access to the record. after the expiration is hit, the shared record will no longer be shared with the user.

Power Commander

Command: Grant-KeeperRecordAccess

Aliases: kshr

Flags:

  • -Record : Record Uid which needs to be shared.

  • -User : Email ID of user to be shared

  • -CanEdit : Use to grant permission of Can Manage Records to the user.

  • -CanShare : Use to grant permission of Can Manage Users to the user

  • -ExpireIn : 5

  • -ExpireAt : Date Object

Example:

PS > Grant-KeeperRecordAccess -Record record_uid -User "[email protected]" -CanShare -ExpireIn 5
Record "Example Record" was shared with [email protected]
Python CLI

Command: share-record --action=<> --email=<email>

Parameters:

  • record : <RECORD_UID> of record to be shared

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

  • -a, --action : Grant, revoke, owner and cancel - permission set for record

Options:

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

  • -w, --write : Allow user to edit record

  • -R, --recursive : Apply command to the shared folder hierarchy

  • --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

  • --contact-only : Share with known contacts only, prompts for matching contacts with other domains

  • -f, --force : Skip asking prompts

Example:

My Vault> share-record -a='grant' -e='[email protected]' -s -w --expire-in=30d af9ed1c8_d2b4_43a3_a459
Record "af9ed1c8_d2b4_43a3_a459" access permissions has been granted to user '[email protected]'
Python SDK

Command : Coming Soon

Share - Cancel Command

This command can be used to remove all shares with the given user

DotNet CLI

Command: share-record

Action:

  • cancel : cancel a record share with user

Flags:

  • -e, --email (string, required)

Example:

Vault> share-record cancel [email protected]
Do you want to cancel all shares with user "[email protected]"? (Yes/No) : yes
DotNet SDK

Function:

Task CancelSharesWithUser(string username);

Arguments:

username - username of user with whom we will cancel all shares

Exception:

Authentication.KeeperApiException
Power Commander

Command : Coming Soon

Python CLI

Command: share-record

Parameters:

  • record : <RECORD_UID> of record to be shared

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

  • -a, --action : Grant, revoke, owner and cancel - permission set for record

Example:

Vault> share-record --action=cancel [email protected] <record_uid>
Python SDK

Command : Coming Soon

Share Record - Revoke Command

This command can be used to revoke access of a record to a user.

DotNet CLI

Command: share-record

Action:

  • revoke : revoke a record share access from user

Flags:

  • -e, --email (string, required)

  • record (positional, required)

    • Record path or UID to be shared.

    • Example: MyPasswords/Bank or 9xL2c6aBc1234

Example:

My Vault> share-record revoke uidaabbcc22556tbuid --email="[email protected]"
DotNet SDK

Function:

Task RevokeShareFromUser(string recordUid, string username);

Arguments:

  • recordUid - This is UID of the record which is to be revoked from user

  • username - Email of the user from whom we are revoking the share

Power Commander

Command: Revoke-KeeperRecordAccess

Flags:

  • -Record : Record Uid

  • -User : Email ID of user to be shared

Example:

PS > Revoke-KeeperRecordAccess adscsvv1314dca -User [email protected]                    
Record "some_record" share has been removed from <user>
Python CLI

Command: share-record

Parameters:

  • record : <RECORD_UID> of record to be shared

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

  • -a, --action : Grant, revoke, owner and cancel - permission set for record

Options:

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

  • -w, --write : Allow user to edit record

  • -R, --recursive : Apply command to the shared folder hierarchy

  • --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

  • --contact-only : Share with known contacts only, prompts for matching contacts with other domains

  • -f, --force : Skip asking prompts

Example:

My Vault> share-record -a='revoke' -e='[email protected]' <record_uid>
access permissions has been revoked from user '[email protected]'
Python SDK

Command : Coming Soon

Share Record - Transfer Ownership Command

This command can be used to grant owner access of a record to a user.

DotNet CLI

Command: share-record

Action:

  • transfer : Transfer a record / change record ownership.

Flags:

  • -e, --email (string, required)

  • record (positional, required)

    • Record path or UID to be shared.

    • Example: MyPasswords/Bank or 9xL2c6aBc1234

Example:

My Vault> share-record transfer aabbcc2266hyy --email="[email protected]"
DotNet SDK

Function:

Task TransferRecordToUser(string recordUid, string username)

Arguments:

  • recordUid - This is UID of the record which is to be shared with user.

  • username - Email of the user with whom we are sharing the record.

Exception:

KeeperApiException
Power Commander

Command: Move-KeeperRecordOwnership

Flags:

  • -Record : Record Uid which needs to be shared.

  • -User : Email ID of user to be shared

Example:

PS > Move-KeeperRecordOwnership record_uid -User [email protected]
Record "<some record title>" was transfered to [email protected]
The new record owner can edit or remove your access to this record.
Python CLI

Command: share-record

Parameters:

  • record : <RECORD_UID> of record to be shared

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

  • -a, --action : Grant, revoke, owner and cancel - permission set for record

Options:

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

  • -w, --write : Allow user to edit record

  • -R, --recursive : Apply command to the shared folder hierarchy

  • --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

  • --contact-only : Share with known contacts only, prompts for matching contacts with other domains

  • -f, --force : Skip asking prompts

Example:

My Vault> share-record -a='owner' -e='[email protected]' record_uid
Python SDK

Command : Coming Soon

Last updated

Was this helpful?