User

Represents a user in your organization.

Supported Calls

create(), update(), query(), search(), retrieve(), getUpdated(), describeSObjects(), upsert()

Special Access Rules

  • To create() or update() a User object, you must log in with the “Manage Users” permission.
  • Customer Portal users can only view Custom Portal users in that account.

Fields

Field Field Type Field Properties Description
Alias string Create

Filter

Update

Required. The user’s alias. For example, “jsmith.”
CallCenterId reference Create

Filter

Nillable

Update

If Salesforce Call Center is enabled, represents the call center to which this user is assigned.
City string Create

Filter

Nillable

Update

The city associated with the user.
CommunityNickname string Create

Filter

Nillable

Update

Name used to identify this user in the Salesforce Ideas online community.
CompanyName string Create

Filter

Nillable

Update

The name of the user’s company.
ContactId reference Create

Filter

ID of the Contact associated with this account. The contact must have a value in the AccountID field or an error occurs. For information on IDs, see ID Field Type.
Country string Create

Filter

Nillable

Update

The country associated with the user.
DefaultCurrencyIsoCode picklist Create

Filter

Nillable

Restricted picklist

Update

The user's default currency setting for new records. For example, a user in France could have a DefaultCurrencyIsoCode set to Euros, and that would be their default currency in the application. However, the User object could have currency custom fields stored in a different currency.

Only applicable for organizations that use multiple currencies.

For more information, see CurrencyIsoCode

DefaultDivision picklist Create

Defaulted on create

Filter

Restricted picklistUpdate
The user’s default division. Only applicable if divisions are enabled for your organization. For more information, see the Salesforce online help.
DelegatedApproverId reference Create

Filter

Nillable

Update

Id of the user who is a delegated approver for this user.
Department string Create

Filter

Nillable

Update

The company department associated with the user.
Division string Create

Filter

Nillable

Update

The division associated with this user, similar to Department and unrelated to DefaultDivision.
Email email Create

Filter

Update

Required. The user’s email address.
EmailEncodingKey picklist Create

Filter

Restricted picklist

Update

Required. The email encoding for the user, such as “ISO-8859-1” or “UTF-8”.
EmployeeNumber string Create

Filter

Nillable

Update

The user’s employee number.
Extension phone Create

Filter

Nillable

Update

The user’s phone extension number.
Fax phone Create

Filter

Nillable

Update

The user’s fax number.
FederationIdentifier string Create

Filter

Indicates the value that must be listed in the Subject element of a Security Assertion Markup Language (SAML) IDP certificate to authenticate the user for a client application using single sign-on with Salesforce. This value must be specified if the SAML User ID Type is Assertion contains Federation ID from the User object. Otherwise, this field cannot be edited.
FirstName string Create

Filter

Nillable

Update

The user’s first name.
ForecastEnabled boolean Create

Defaulted on create

Filter

Update

Indicates whether the user is enabled as a Forecast Manager (true) or not (false) in customizable forecasting. Forecast managers see forecast rollups from users below them in the forecast hierarchy.
IsActive boolean Create

Defaulted on create

Filter

Update

Indicates whether the user has access to log in (true) or not (false). You can modify a User's active status from the Salesforce user interface or via the API.
IsPartner boolean Defaulted on create

Filter

Indicates whether the user is a partner who has access to the PRM Portal (true) or not (false). This field is not available for release 9.0 and later. Instead, use UserType with the value PRM.
IsPortalSelfRegistered boolean Defaulted on create

Filter

Indicates whether the user is a Customer Portal user who self-registered for your organization's Customer Portal (true) or not (false). This field is not available for release 9.0 and earlier.

For more information on the Customer Portal and self-registration, see Enabling Customer Portal Login and Settings in the Salesforce online help.

LanguageLocaleKey picklist Create

Filter

Restricted picklist

Update

Required. The user’s language, such as “French” or “Chinese (Traditional).” Label is Language.
LastLoginDate dateTime Filter

Nillable

The date and time when the user last logged in.
LastName string Create

Filter

Update

Required. The user’s last name.
LocaleSidKey picklist Create

Filter

Restricted picklist

Update

Required. This field is a restricted picklist field. The value of the field affects formatting and parsing of values, especially numeric values, in the user interface. It does not affect the API.

The field values are named according to the language, and country if necessary, using two-letter ISO codes. The set of names is based on the ISO standard. It can often be more convenient to manually set a user’s locale in the Salesforce user interface, and then use that value for inserting or updating other users via the API.

Manager picklist Create

Filter

Restricted picklist

Update

User lookup field used to select the user's manager. This establishes a hierarchical relationship, preventing you from selecting a user that directly or indirectly reports to itself.
MobilePhone phone Create

Filter

Nillable

Update

The user’s mobile or cellular phone number.
MobileUser boolean Create

Update

Indicates whether the user is allocated one Force.com Mobile license (true) or not (false). Label is Mobile User. The Force.com Mobile license grants the user access to Force.com Mobile capabilities.
Name string Filter Concatenation of FirstName and LastName. Limited to 121 characters.
OfflineTrialExpirationDate dateTime Filter

Nillable

The date and time when the user’s Connect Offline trial expires.
Phone phone Create

Filter

Nillable

Update

The user’s phone number.
Postal Code string Create

Filter

Nillable

Update

The user’s postal or ZIP code. Label is Zip/Postal Code.
ProfileId reference Create

Filter

Update

Required. ID of the user’s Profile. Use this value to cache metadata based on profile. For information on IDs, see ID Field Type. In earlier releases, this was RoleId.
ReceivesAdminInfoEmails boolean Create

Defaulted on create

Filter

Update

Indicates whether the user receives email for administrators from salesforce.com (true) or not (false).
SFContentUser boolean Create

Update

Indicates whether the user is allocated one Salesforce Content User License (true) or not (false). Label is Salesforce Content User. The Salesforce Content User license grants the user access to the Salesforce Content application.
ReceiveInfoEmails boolean Create

Defaulted on create

Filter

Update

Indicates whether the user receives informational email from salesforce.com (true) or not (false).
State string Create

Filter

Nillable

Update

The state associated with the User.
Street textarea Create

Filter

Nillable

Update

The street address associated with the User.
TimeZoneSidKey picklist Create

Filter

Restricted picklist

Update

Required. This field is a restricted picklist field. A User’s time zone affects the offset used when displaying or entering times in the user interface. However, the API does not use a User’s time zone when querying or setting values.

Values for this field are named using region and key city, according to ISO standards. It can often be more convenient to manually set a User’s time zone in the user interface, and then use that value for creating or updating other Users via the API.

Title string Create

Filter

Nillable

Update

The user’s business title, such as “Vice President.”
Username string Create

Filter

Update

Required. Contains the name that a user enters to log into the API or the Salesforce user interface. The value for this field must be in the form of an email address. It must also be unique across all Salesforce instances. If you try to create() or update() a User with a duplicate value for this field, the operation is rejected.

Each inserted User also counts as a license in Salesforce. Every organization has a maximum number of licenses. If you attempt to exceed the maximum number of licenses by inserting Users, the create() call is rejected.

UserPermissionsCallCenterAutoLogin boolean Create

Update

Required if Salesforce Call Center is enabled. Indicates whether the user is enabled to use the auto login feature of the call center (true) or not (false).
UserPermissionsMarketingUser boolean Create

Update

Required. Indicates whether the user is enabled to manage campaigns in the online application (true) or not (false). Label is Marketing User.
UserPermissionsOfflineUser boolean Create

Update

Required. Indicates whether the user is enabled to use Offline Edition (true) or not (false). Label is Offline User.
UserPreferencesActivityRemindersPopup boolean Filter

Nillable

When true, a reminder popup window automatically opens when an activity reminder is due. Corresponds to the Trigger alert when reminder comes due checkbox at Setup | My Personal Information | Reminders in the Salesforce user interface. See "Customizing Activity Reminders" in the Salesforce online help.
UserPreferencesApexPagesDeveloperMode boolean Filter

Nillable

When true, indicates the user has enabled developer mode for editing Visualforce pages and controllers.
UserPreferencesEventRemindersCheckboxDefault boolean Filter

Nillable

When true, a reminder popup is automatically set on the user's events. Corresponds to the By default, set reminder on Events to... checkbox Setup | My Personal Information | Reminders in the online application. This field is related to UserPreference. Also, see Customizing Activity Reminders in the Salesforce online help.
UserPreferencesTaskRemindersCheckboxDefault boolean Filter

Nillable

When true, a reminder popup is automatically set on the user's tasks. Corresponds to the By default, set reminder on Tasks to... checkbox at Setup | My Personal Information | Reminders in the online application. This field is related to UserPreference. Also, see Customizing Activity Reminders in the Salesforce online help.
UserPreferencesReminderSoundOff boolean Filter

Nillable

When true, a sound automatically plays when an activity reminder is due. Corresponds to the Play a reminder sound checkbox at Setup | My Personal Information | Reminders in the online application. See Customizing Activity Reminders in the Salesforce online help.
UserRoleId reference Create

Filter

Nillable

Update

ID of the user’s UserRole. Label is Role ID.
UserType picklist Filter

Nillable

Restricted picklist

The category of user license. Each UserType is associated with one or more UserLicenses. Each UserLicense is associated with one or more profiles. In API version 10.0 and later, valid values include:
  • Standard: Salesforce user license. This user type also includes Salesforce Platform and Salesforce Platform One user licenses. Label is Standard.
  • PowerPartner: PRM user whose access is limited because he or she is a partner and typically accesses the application through a partner portal. Label is Partner.
  • CustomerSuccess: user whose access is limited because he or she is an organization's customer and accesses the application through a customer portal. Label is Customer Portal User.
  • PowerCustomerSuccess: user whose access is limited because he or she is an organization's customer and accesses the application through a customer portal. Label is Customer Portal Manager.

    Users with this license type can view and edit data they directly own or data owned by or shared with users below them in the customer portal role hierarchy.

WirelessEmail email Create

Filter

Nillable

Update

Wireless email address associated with this user.

Usage

Use this object to query information about users and to provision and modify users in your organization. Unlike other objects, the records in the User table represent actual users—not data owned by users. All Users have access to use query() or describeSObjects() with User objects.

Deactivate Users

You cannot delete()Users in the Salesforce user interface or the API. You can deactivate a User in the Salesforce user interface. Because User can never be deleted, we recommend that you exercise caution when creating them.

Passwords

For security reasons, you cannot query User passwords via the API or the Salesforce user interface. However, the API allows you to set and “reset” User passwords using the setPassword() and resetPassword() calls. The password lockout status and the ability to reset the User locked-out status is not available via the API. You must check and reset the User password lockout status using the Salesforce user interface.

See Also:
getUserInfo()
© Copyright 2000-2008 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.