{"id":940,"date":"2021-03-03T10:39:55","date_gmt":"2021-03-03T08:39:55","guid":{"rendered":"https:\/\/www.flip-design.de\/?p=940"},"modified":"2021-03-03T10:39:55","modified_gmt":"2021-03-03T08:39:55","slug":"which-user-does-really-need-a-power-bi-pro-license","status":"publish","type":"post","link":"https:\/\/www.flip-design.de\/?p=940","title":{"rendered":"Which user does really need a Power BI Pro license?"},"content":{"rendered":"\n<p>In a Power BI Premium license environment, only the Report creators have a Power BI Pro license, because they create Reports, Dashboards and so on. The other users, who only consume the data, are assigned to a Free license. In the past, I saw so many organization\u2019s where users have a Pro license, because they need a in the past, but now they do not do anything with it. For an administrator it can be horrible to find out, which user really need a license, because, when he does not use the activity logs, he must ask every user which has one assigned. In a previous Blog Post, I have explained how you can get the Activities of the last 90 days into CSV files. If you run this automatically and over a long term of time, you get a good time series (<a href=\"https:\/\/www.flip-design.de\/?p=916\">https:\/\/www.flip-design.de\/?p=916<\/a>). With this data you can easily create a filter, to check which user creates reports or so on:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/03\/image.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"260\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/03\/image.png\" alt=\"\" class=\"wp-image-941\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/03\/image.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/03\/image-300x129.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/03\/image-500x215.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>\u00a0Now you need the information which user has a Pro license assigned. To get this information, you can request your Active Directory, get this data into a CSV file, and merge it with this data. The following script exports every user into the defined file who has a license.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span class=\"has-inline-color has-light-gray-color\">$myPassword = '&lt;password>'\r\n$myUsername = 'philipp@plenz.onmicrosoft.com'\r\n\r\n$password = ConvertTo-SecureString $myPassword -AsPlainText -Force\r\n$credential = New-Object System.Management.Automation.PSCredential ($myUsername, $password)\r\nConnect-AzureAD -Credential $credential\r\n\r\n$RetrieveDate = Get-Date \r\n$BasePath = \"C:\\Users\\plenz\\OneDrive\\Power BI WS\"\r\n$AzureADUsersCSV = $BasePath + \"Users.csv\"\r\n$OrgO365LicensesCSV = $BasePath + \"OrgO365Licenses.csv\"\r\n$UserPBIProLicensesCSV = $BasePath + \"UserPBIProLicenses.csv\"\r\n\r\n&lt;#\r\nSee MS Licensing Service Plan reference: \r\nhttps:&#47;&#47;docs.microsoft.com\/en-us\/azure\/active-directory\/users-groups-roles\/licensing-service-plan-reference\r\n#>\r\n$PBIProServicePlanID = \"70d33638-9c74-4d01-bfd3-562de28bd4ba\"\r\n\r\n\r\n$ADUsers = Get-AzureADUser -All $true | Select-Object ObjectId, ObjectType, CompanyName, Department, DisplayName, JobTitle, Mail, Mobile, `\r\n            SipProxyAddress, TelephoneNumber, UserPrincipalName, UserType, @{Name=\"Date Retrieved\";Expression={$RetrieveDate}}\r\n\r\n$OrgO365Licenses = Get-AzureADSubscribedSku | Select-Object SkuID, SkuPartNumber,CapabilityStatus, ConsumedUnits -ExpandProperty PrepaidUnits | `\r\n    Select-Object SkuID,SkuPartNumber,CapabilityStatus,ConsumedUnits,Enabled,Suspended,Warning, @{Name=\"Retrieve Date\";Expression={$RetrieveDate}} \r\n   \r\n$UserLicenseDetail = ForEach ($ADUser in $ADUsers)\r\n    {\r\n        $UserObjectID = $ADUser.ObjectId\r\n        $UPN = $ADUser.UserPrincipalName\r\n        $UserName = $ADUser.DisplayName\r\n        $UserDept = $ADUser.Department\r\n        Get-AzureADUserLicenseDetail -ObjectId $UserObjectID -ErrorAction SilentlyContinue | `\r\n        Select-Object ObjectID, @{Name=\"User Name\";Expression={$UserName}},@{Name=\"UserPrincipalName\";Expression={$UPN}}, `\r\n        @{Name=\"Department\";Expression={$UserDept}},@{Name=\"Retrieve Date\";Expression={$RetrieveDate}} -ExpandProperty ServicePlans\r\n    }\r\n    $ProUsers\r\n$ProUsers = $UserLicenseDetail | Where-Object {$_.ServicePlanId -eq $PBIProServicePlanID}\r\n\r\n$ProUsers | Export-Csv $UserPBIProLicensesCSV<\/span><\/code><\/pre>\n\n\n\n<p>After that, you can create a relationship between both tables and you can check, which user really needs the Pro license, or you can assign it to another user.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/03\/image-1.png\"><img decoding=\"async\" loading=\"lazy\" width=\"588\" height=\"359\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/03\/image-1.png\" alt=\"\" class=\"wp-image-942\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/03\/image-1.png 588w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/03\/image-1-300x183.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/03\/image-1-491x300.png 491w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In a Power BI Premium license environment, only the Report creators have a Power BI Pro license, because they create Reports, Dashboards and so on. The other users, who only consume the data, are assigned to a Free license. In &hellip; <a href=\"https:\/\/www.flip-design.de\/?p=940\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/940"}],"collection":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=940"}],"version-history":[{"count":1,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/940\/revisions"}],"predecessor-version":[{"id":943,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/940\/revisions\/943"}],"wp:attachment":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}