Newer Version Available

This content describes an older version of this product. View Latest

User

The User object is a JSON-formatted object containing context information about the current user. This information can be used within the canvas app (for example, to display the user’s name) or to make subsequent calls to retrieve additional information (for example, to get role information for the current user).

Field Description
accessibilityModeEnabled For the context user, indicates whether user interface modifications for the visually impaired are on (true) or off (false).
currencyISOCode Returns the context user's default currency code for multiple currency organizations or the organization's currency code for single currency organizations.
email The context user’s email address.
firstName The context user's first name.
fullName The context user's full name. The format is: Firstname Lastname.
isDefaultNetwork For the context user, indicates whether the user is in a community (true) or not (false).

Canvas apps are not supported for guest users. They are supported on communities only for logged in users.

Important

language The context user’s language. String is 2-5 characters long. The first two characters are always an ISO language code, for example “fr” or “en.” If the value is further qualified by country, then the string also has an underscore (_) and another ISO country code, for example “US” or “UK.” For example, the string for the United States is “en_US,” and the string for French Canadian is “fr_CA.”
lastName The context user's last name.
locale The context user’s locale.
networkId The ID of the context user’s currently logged-in community.
profileId The ID of the profile associated with the role currently assigned to the context user.
profilePhotoUrl The URL for the photo of the context user’s profile photo if Chatter is enabled. The URL is updated every time a photo is uploaded and reflects the most recent photo. URL returned for an older photo is not guaranteed to return a photo if a newer photo has been uploaded. Always query this field for the URL of the most recent photo.
profileThumbnailUrl The URL for a thumbnail of the context user’s profile photo if Chatter is enabled. The URL is updated every time a photo is uploaded and reflects the most recent photo. URL returned for an older photo is not guaranteed to return a photo if a newer photo has been uploaded. Always query this field for the URL of the most recent photo.
roleId The ID of the context user’s currently assigned role.
siteUrl The URL of the context user’s currently logged-in community.
siteUrlPrefix The URL prefix of the context user’s currently logged-in community.
timeZone The context user’s time zone.
userId The context user’s ID.
userName The context user’s login name.
userType The type of user license assigned to the profile associated with the context user.

The following code snippet shows an example of the User object.