Office.SharedProperties interface

Represents the properties of an appointment or message in a shared folder or shared mailbox.

For more information on how this object is used, see Enable shared folders and shared mailbox scenarios in an Outlook add-in.

Remarks

[ API set: Mailbox 1.8 for shared folder support, Mailbox 1.13 for shared mailbox support ]

Minimum permission level: read item

Applicable Outlook mode: Compose or Read

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/65-delegates-and-shared-folders/get-shared-properties.yaml

Office.context.mailbox.item.getSharedPropertiesAsync((result) => {
  if (result.status === Office.AsyncResultStatus.Failed) {
    console.error("The current folder or mailbox isn't shared.");
    return;
  }
  const sharedProperties = result.value;
  console.log(`Owner: ${sharedProperties.owner}`);
  console.log(`Permissions: ${sharedProperties.delegatePermissions}`);
  console.log(`Target mailbox: ${sharedProperties.targetMailbox}`);
});

Properties

delegatePermissions

The permissions that the delegate has on a shared folder, or the user has on a shared mailbox.

owner

The email address of the owner of a shared item.

targetMailbox

The location of the owner's mailbox for the delegate's access. This location may differ based on the Outlook client.

Use with targetRestUrl to construct the REST operation's URL.

Example usage: targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"

targetRestUrl

The REST API's base URL (currently https://outlook.office.com/api).

Use with targetMailbox to construct the REST operation's URL.

Example usage: targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"

Property Details

delegatePermissions

The permissions that the delegate has on a shared folder, or the user has on a shared mailbox.

delegatePermissions: MailboxEnums.DelegatePermissions;

Property Value

owner

The email address of the owner of a shared item.

owner: string;

Property Value

string

targetMailbox

The location of the owner's mailbox for the delegate's access. This location may differ based on the Outlook client.

Use with targetRestUrl to construct the REST operation's URL.

Example usage: targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"

targetMailbox: string;

Property Value

string

targetRestUrl

The REST API's base URL (currently https://outlook.office.com/api).

Use with targetMailbox to construct the REST operation's URL.

Example usage: targetRestUrl + "/{api_version}/users/" + targetMailbox + "/{REST_operation}"

targetRestUrl: string;

Property Value

string