This topic has not yet been rated - Rate this topic

UserProfile object (JavaScript API for Office v1.1)

JavaScript API for Office v1.1

Represents the host application's user profile information.

Last modified: February 25, 2014

Applicable Outlook modes

Compose or read

Available in requirement sets

Mailbox

Office.context.mailbox.userProfile
Properties

Property name

Outlook mode

Description

Introduced in

displayName

Compose or read

The user name to use for display.

Version 1.0

emailAddress

Compose or read

The user's SMTP email address.

Version 1.0

timeZone

Compose or read

The user's local time zone.

Version 1.0

The UserProfile object is returned as the userProfile property of the Mailbox object.

The following JavaScript code sample shows how to access the displayName property of the UserProfile object which represents the current user in Microsoft Outlook.

Office.initialize = function () {
    // Checks for the DOM to load using the jQuery ready function.
    $(document).ready(function () {
    // After the DOM is loaded, app-specific code can run.
    var userProfile = Office.context.mailbox.userProfile;
    var name = userProfile.displayName;
    // Continue with processing the user's display name.   
    });
}

App types

Mail app

Supported clients

Outlook 2013, Outlook 2013 SP1, Outlook Web App, and OWA for Devices

Library

Office.js

Namespace

Office

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.