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
display |
Gets the user's display name. |
email |
Gets the user's SMTP email address. |
time |
Gets the user's time zone in Windows format. The system time zone is usually returned. However, in Outlook on the web, 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, 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);
Office Add-ins
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for