Export Power Apps and Power Automate user licenses

Published Apr 23 2021 05:48 AM 2,128 Views
Senior Member

Context

During a Power Platform audit for a customer, I was looking for exporting all user licenses data into a single file to analyze it with Power BI. In this article, I’ll show you the easy way to export Power Apps and Power Automate user licenses with PowerShell!

 

Download user licenses

To do this, we are using PowerApps PowerShell and more particular, the Power Apps admin module.

 

To install this module, execute the following command as a local administrator:

 

Install-Module -Name Microsoft.PowerApps.Administration.PowerShell

 

Note: if this module is already installed on your machine, you can use the Update-Module command to update it to the latest version available.

 

Then to export user licenses data, you just need to execute the following command and replace the target file path to use:

 

Get-AdminPowerAppLicenses -OutputFilePath <PATH-TO-CSV-FILE>

 

Note: you will be prompted for your Microsoft 365 tenant credentials, you need to sign-in as Power Platform Administrator or Global Administrator to execute this command successfully.

 

After this, you can easily use the generated CSV file in Power BI Desktop for further data analysis:

 

power-platform-licenses.png

 

Happy reporting everyone!

 

You can read this article on my blog here.

 

Resources

https://docs.microsoft.com/en-us/powershell/powerapps/get-started-powerapps-admin

https://docs.microsoft.com/en-us/powershell/module/microsoft.powerapps.administration.powershell/get...

%3CLINGO-SUB%20id%3D%22lingo-sub-2281840%22%20slang%3D%22en-US%22%3EExport%20Power%20Apps%20and%20Power%20Automate%20user%20licenses%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2281840%22%20slang%3D%22en-US%22%3E%3CH2%20id%3D%22toc-hId--492822088%22%20id%3D%22toc-hId--492821415%22%3EContext%3C%2FH2%3E%0A%3CP%3EDuring%20a%20Power%20Platform%20audit%20for%20a%20customer%2C%20I%20was%20looking%20for%20exporting%20all%20user%20licenses%20data%20into%20a%20single%20file%20to%20analyze%20it%20with%20Power%20BI.%20In%20this%20article%2C%20I%E2%80%99ll%20show%20you%20the%20easy%20way%20to%20export%20Power%20Apps%20and%20Power%20Automate%20user%20licenses%20with%20PowerShell!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1994690745%22%20id%3D%22toc-hId-1994691418%22%3EDownload%20user%20licenses%3C%2FH2%3E%0A%3CP%3ETo%20do%20this%2C%20we%20are%20using%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fpowerapps%2Foverview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EPowerApps%20PowerShell%3C%2FA%3E%20and%20more%20particular%2C%20the%20Power%20Apps%20admin%20module.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20install%20this%20module%2C%20execute%20the%20following%20command%20as%20a%20%3CSTRONG%3Elocal%26nbsp%3Badministrator%3C%2FSTRONG%3E%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EInstall-Module%20-Name%20Microsoft.PowerApps.Administration.PowerShell%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ENote%3A%3C%2FSTRONG%3E%26nbsp%3Bif%20this%20module%20is%20already%20installed%20on%20your%20machine%2C%20you%20can%20use%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fpowershellget%2Fupdate-module%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EUpdate-Module%3C%2FA%3E%20command%20to%20update%20it%20to%20the%20latest%20version%20available.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThen%20to%20export%20user%20licenses%20data%2C%20you%20just%20need%20to%20execute%20the%20following%20command%20and%20replace%20the%20target%20file%20path%20to%20use%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EGet-AdminPowerAppLicenses%20-OutputFilePath%20%3CPATH-TO-CSV-FILE%3E%3C%2FPATH-TO-CSV-FILE%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ENote%3A%3C%2FSTRONG%3E%20you%20will%20be%20prompted%20for%20your%20Microsoft%20365%20tenant%20credentials%2C%20you%20need%20to%20sign-in%20as%26nbsp%3B%3CSTRONG%3EPower%20Platform%20Administrator%20or%20Global%20Administrator%3C%2FSTRONG%3E%20to%20execute%20this%20command%20successfully.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20this%2C%20you%20can%20easily%20use%20the%20generated%20CSV%20file%20in%20Power%20BI%20Desktop%20for%20further%20data%20analysis%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22power-platform-licenses.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F274789iE9950278D1A7DBFC%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22power-platform-licenses.png%22%20alt%3D%22power-platform-licenses.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EHappy%20reporting%20everyone!%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20read%20this%20article%20on%20my%20blog%20%3CA%20href%3D%22https%3A%2F%2Fyhabersaat.ch%2F2021%2F04%2F18%2Fget-power-apps-power-automate-user-licenses%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehere%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-187236282%22%20id%3D%22toc-hId-187236955%22%3E%3CSPAN%3EResources%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fpowerapps%2Fget-started-powerapps-admin%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fpowerapps%2Fget-started-powerapps-admin%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fmicrosoft.powerapps.administration.powershell%2Fget-adminpowerapplicenses%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fmicrosoft.powerapps.administration.powershell%2Fget-adminpowerapplicenses%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2281840%22%20slang%3D%22en-US%22%3E%3CP%3EDuring%20a%20Power%20Platform%20audit%20for%20a%20customer%2C%20I%20was%20looking%20for%20exporting%20all%20user%20licenses%20data%20into%20a%20single%20file%20to%20analyze%20it%20with%20Power%20BI.%20In%20this%20article%2C%20I%E2%80%99ll%20show%20you%20the%20easy%20way%20to%20export%20Power%20Apps%20and%20Power%20Automate%20user%20licenses%20with%20PowerShell!%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Co-Authors
Version history
Last update:
‎Apr 22 2021 12:24 PM
Updated by: