Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
pborah
Solution Sage
Solution Sage

Get app icons calling the API from PowerShell?

Hi,

 

I'm trying to retrieve all the icons used in our published apps by calling the API from Powershell but it doesn't seem to return anything. It's however not throwing any error either.

 

I am the owner of all those apps and the workspace admin for their source workspaces. Below is my code. Although the API documentation doesn't mention anything specific about getting the icons, I had a bit of help from co-pilot. Which is why I understand that this capability may not even exist since co-pilot can just make stuff up sometimes.

 

$credential = Get-Credential
Login-PowerBI -Credential $credential


$apiUrl = "https://api.powerbi.com/v1.0/myorg/apps"
$response = Invoke-PowerBIRestMethod -Url $apiUrl -Method Get


$savePath = "C:\Users\xyz\Documents"

foreach ($app in $response.value) {
    $appId = $app.id
    $appName = $app.name
    $iconUrl = $app.iconUrl
    $iconPath = Join-Path -Path $savePath -ChildPath "$appName.png"
  
    
    Invoke-WebRequest -Uri $iconUrl -OutFile $iconPath

    Write-Output "App icon for '$appName' downloaded successfully to $iconPath"
}
1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Pure hallucination.

 

Apps - Get Apps - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com

View solution in original post

4 REPLIES 4
v-echaithra
Community Support
Community Support

Hi @pborah ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @pborah,

May I ask if you have gotten this issue resolved?

 

If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

 

Regards,
Chaithra.

lbendlin
Super User
Super User

Pure hallucination.

 

Apps - Get Apps - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com

@lbendlin yeah I think so too. Earlier when I was trying out fetching workspace/report/dashboard details via script, I found there to be some properties that were nested arrays (subproperties) that aren't expliticitly mentioned in the documentation unless you do a deep dive, so I figured maybe that is the case here. But after trying out atleast 20 different variations of the code above, I'm beginning to think this capability does not exist yet. It should but it doesn't.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.