---
schema_version: "1"
id: ff16787d841636b1d5ae9c0d581d7912c7dfa003fd65a78f04139e9262d18774
title: PermissionSetLicenseAssign
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_permissionsetlicenseassign.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_permissionsetlicenseassign.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: cc4a28d52098373b62f18ba032d665b485aa9453eecfb5e1d5cfa5c1dc7c430e
description: Represents the association between a User and a PermissionSetLicense. This object is available in API version 29.0 and later.
---
# PermissionSetLicenseAssign

Represents the association between a User and a PermissionSetLicense. This object is available in API version 29.0 and later.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

The relationship name for PermissionSetLicenseAssign is PermissionSetLicenseAssignments.

## Supported Calls

create(), delete(), describeSObjects(), query(), retrieve()

## Special Access Rules

As of Summer ’20 and later, only users who have one of these permissions can access this object:

- View Setup and Configuration
- Assign Permission Sets

## Fields

| Field Name | Details |
| --- | --- |
| AssigneeId | 
Type

reference

Properties

Create, Filter, Group, Sort

Description

ID of the User to assign the permission set license specified in PermissionSetLicenseId.

This is a relationship field.

Relationship Name

Assignee

Relationship Type

Lookup

Refers To

User



 |
| IsRevoked | 

Type

boolean

Properties

Defaulted on create, Filter, Group, Sort, Update

Description

Reserved for internal use. This field is available in API version 58.0 and later.



 |
| LastCreatedByChangeId | 

Type

reference

Properties

Filter, Group, Nillable, Sort

Description

ID of the user access change record related to this permission set license assignment. This field is available only if user access policies are enabled. This field is available in API version 58.0 and later.

This field is a relationship field.

Relationship Name

LastCreatedByChange

Relationship Type

Lookup

Refers To

UserAccessChange



 |
| LastDeletedByChangeId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

ID of the user access change record related to this permission set license assignment being revoked. This field is available only if user access policies are enabled. This field is available in API version 58.0 and later.

This field is a relationship field.

Relationship Name

LastCreatedByChange

Relationship Type

Lookup

Refers To

UserAccessChange



 |
| PermissionSetLicenseId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

The ID of the permission set license the user is assigned to.

This is a relationship field.

Relationship Name

PermissionSetLicense

Relationship Type

Lookup

Refers To

PermissionSetLicense



 |

## Usage

Use the PermissionSetLicenseAssign object for querying permission set license assignments to find out which permission set licenses are assigned to which users. Because each user can be assigned to many permission set licenses, each PermissionSetLicenseAssign ID represents the association of a single user and single permission set license.

For example, to search for all of the permission sets assigned to a particular user:

SELECT Id, PermissionSetLicenseId
FROM PermissionSetLicenseAssign
WHERE AssigneeId = '005D0000001RFek'

To search for all users assigned to a particular permission set license:

SELECT AssigneeId 
FROM PermissionSetLicenseAssign
WHERE PermissionSetLicenseId = '0PLD000000003mwOAA'

You can also create a new permission set license assignment, or use delete to remove a permission set license that’s been assigned to a user. To update an assignment, delete an existing assignment and insert a new one.

#### See Also

- [PermissionSetLicense](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_permissionsetlicense.htm "Represents a license that’s used to enable one or more users to receive a specified permission without changing their profile or reassigning profiles. You can use permission set licenses to grant access, but not to deny access. This object is available in API version 29.0 and later.")