Brent Powell shares a Powershell script to retrieve Power BI Pro licensed users:
Per the Power BI licensing documentation, a pro license is required for publishing and editing content in app workspaces. If the app workspace is not assigned to a premium capacity, even the users viewing/consuming the content will require a pro license.
Pro license assignments are also very important from a governance perspective. An organization that has provisioned premium capacity would generally want to limit the number users with pro licenses to users who A) have a clear need for developing and publishing Power BI artifacts (dashboards, reports, dataflows, datasets) on an ongoing basis and B) have received some form of training or certification on using Power BI effectively as well as the organization’s policies for using Power BI.
As one (very) simple example for an organization with premium capacity, two users in a department of ten could be determined to be the content creators for their department – perhaps one will build datasets and the other will build reports and dashboards. These two users, along with maybe a backup user, could be assigned pro licenses. Other users on the team without a pro license could still make development and test related contributions to their team’s projects via Power BI Desktop and the Viewer workspace role but they would rely on the pro users in their department for publishing and distributing content.
Click through for the script and a detailed explanation.