UserLicense

Represents a user license in your organization. A user license entitles a user to specific functionality and determines the profiles and permission sets available to the user.

Introduced in API version 10.0.

describeSObjects(), query(), retrieve()

  • Type: string
  • Properties: Filter, Group, Sort, Update
  • Type: string
  • Properties: Filter, Group, Sort, Update
  • Introduced: API version 32.0
  • Description: The user license label.
  • Type: int
  • Properties: Filter, Group, Nillable, Sort, Update
  • Introduced: API version 20.0
  • Type: int
  • Properties: Group, Nillable, Sort
  • Introduced: API version 20.0
  • Type: string

  • Properties: Filter, Group, idLookup, Sort, Update

  • Description: The internal name of the user license.

    Your organization may also include custom user licenses.

  • Type: picklist
  • Properties: Filter, Group, Restricted picklist, Sort, Update
  • Introduced: API version 32.0
  • Description: The current status of the user license. Valid values for this field are Active and Disabled.
  • Type: int
  • Properties: Filter, Group, Sort, Update
  • Introduced: API version 32.0
  • Description: The number of user licenses in the organization.
  • Type: picklist
  • Properties: Filter, Group, Nillable, Restricted picklist, Sort, Update
  • Introduced: API version 28.0
  • Type: int

  • Properties: Filter, Group, Sort

  • Introduced: API version 32.0

  • Description:

    The number of user licenses that are assigned to active users in the organization.

    This field isn’t filterable in API version 64.0 or later when using it in a WHERE clause in a SOQL query. Instead, you have to process the data after fetching all the records.

  • Type: datetime
  • Properties: Filter, Sort
  • Introduced: API version 41.0

Users with the “View Setup and Configuration” permission can use the UserLicense object to view the set of currently defined user licenses in your organization.

The UserLicense object is currently used by bulk user creation to determine the user license to which each profile and permission set belongs. For example, if you use the API to create portal users and you want to know which profile belongs to each portal user license, you can query this object for each profile and check the LicenseDefinitionKey to identify the associated user license.