Office.UserProfile interface

Information about the user associated with the mailbox. This includes their account type, display name, email address, and time zone.

Remarks

Minimum permission level: read item

Applicable Outlook mode: Compose or Read

Properties

displayName

Gets the user's display name.

emailAddress

Gets the user's SMTP email address.

timeZone

Gets the user's time zone in Windows format.

The system time zone is usually returned. However, in Outlook on the web and in new Outlook on Windows), the default time zone in the calendar preferences is returned instead.

Property Details

displayName

Gets the user's display name.

displayName: string;

Property Value

string

Remarks

Minimum permission level: read item

Applicable Outlook mode: Compose or Read

Examples

// Example: Allie Bellew
console.log(Office.context.mailbox.userProfile.displayName);

emailAddress

Gets the user's SMTP email address.

emailAddress: string;

Property Value

string

Remarks

Minimum permission level: read item

Applicable Outlook mode: Compose or Read

Examples

// Example: allieb@contoso.com
console.log(Office.context.mailbox.userProfile.emailAddress);

timeZone

Gets the user's time zone in Windows format.

The system time zone is usually returned. However, in Outlook on the web and in new Outlook on Windows), the default time zone in the calendar preferences is returned instead.

timeZone: string;

Property Value

string

Remarks

Minimum permission level: read item

Applicable Outlook mode: Compose or Read

Examples

// Example: Pacific Standard Time
console.log(Office.context.mailbox.userProfile.timeZone);