Skip to content

Share a record or folder with a colleague

Give a colleague access to one record, or to every record in a folder’s key domain.

Who can do this: a domain owner of the record’s or folder’s key domain.

The samples use the allowed helper from Access decisions.

1. Choose what to share

To shareCallTarget
One recorddomains.shareRecordThe record’s locator
A folderdomains.shareThe key domain’s root locator

You share a folder as its key domain. The colleague gets every record in the key domain, now and in the future. A folder that is not a key domain root cannot be shared alone. See Owners and sub-domains.

2. Share

// one record
const shared = await allowed(await client.domains.shareRecord(locator, colleague));
// a folder's key domain
const sharedDomain = await allowed(await client.domains.share(root, { person: colleague }));

3. Handle the decision

OutcomeWhenWhat to do
allowThe colleague has access on every device they hold.Nothing more.
denyThe caller is not a domain owner, or the policies refuse the share.Show text.
challengeThe policies require a fresh multi-factor sign-in.Call stepUp(), or use the allowed helper.

Next