Please follow the steps mentioned below :
This will display a list of every ACTIVE user along with their internal Id, who have that license. If you would want to view the assigned license(s) of INACTIVE users, you would need to replace the "IsActive=true" with "IsActive=false"
Note: If you are not sure about the name of the licenses, please get the name from under permission set license assigned from company information.
The steps on this article are only applicable and will only work for Organization that has API access. For more information see Salesforce Editions with API access
PermissionSetLicenseAssign is the junction object that links a user to a Permission Set License
000381153

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.