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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
SethB
Advocate II
Advocate II

How to get the workspace id from within report itself

This is bit of a weird problem, but I was wondering is there any way to get the workspace id that a report is housed in from within the report itself?

 

We have set up three separate workspaces (Dev, Test, and Production) and we are embeding reports from each of those 3 workspaces into our site. For example, if we have a report called "Sales" we have three separate instances of Sales that we embed into internal sites. The dev Sales report is embeded in our dev internal site, test with our test site, and so on. When we are pushing any major changes through the Sales report development process, all three look exactly the same, so it would be nice if there was a way to display within the report itself a note or watermark to signify which instance of Sales is being displayed at any point in time.

 

So i was wondering if there is any way to have a function in the report get the current workspace id and display just a card signally if that workspace id is the Dev or Test workspaces. I found this thread which might be a possible solution using parameters. However, with that solution I would have to change that parameter's current value every time I pushed to a different workspace, which isn't the end of the world, but it isn't ideal if there is something I could do to make it automatic.

 

Thanks so much for any help you could provide!

1 REPLY 1
collinq
Super User
Super User

Hey @SethB ,

 

This is not something that can be done by default but one though I had was that you could add a card for each ID that you want by getting the information from the Rest API.  For example, the Report Id can be found in the Get REports in Group.  There may be others that might be helpful as well.

 

OR, I found how you could do this in PowerShell and then perhaps put that information where you can use it in the report? How to get WorkspaceId using Power BI Cmdlets for PowerShell - sqlitybi

 




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors