Office.UserProfile interface

有关与邮箱关联的用户的信息。 这包括其帐户类型、显示名称、电子邮件地址和时区。

注解

最低权限级别读取项

适用的 Outlook 模式:撰写或阅读

属性

displayName

获取用户的显示名称。

emailAddress

获取用户的 SMTP 电子邮件地址。

timeZone

获取 Windows 格式的用户时区。

通常返回系统时区。 但是,在Outlook 网页版中,将改为返回日历首选项中的默认时区。

属性详细信息

displayName

获取用户的显示名称。

displayName: string;

属性值

string

注解

最低权限级别读取项

适用的 Outlook 模式:撰写或阅读

示例

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

emailAddress

获取用户的 SMTP 电子邮件地址。

emailAddress: string;

属性值

string

注解

最低权限级别读取项

适用的 Outlook 模式:撰写或阅读

示例

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

timeZone

获取 Windows 格式的用户时区。

通常返回系统时区。 但是,在Outlook 网页版中,将改为返回日历首选项中的默认时区。

timeZone: string;

属性值

string

注解

最低权限级别读取项

适用的 Outlook 模式:撰写或阅读

示例

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