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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
yf569
Helper II
Helper II

Pass User ID parameter from embedded URL to stored procedure

I have some reports embedded in my application. What I want to achieve is, when user login to our application, we catch their user ID information in embedded URL, and pass this to a parameter in a stored procedure and work as a filter. From I can see in below links, this function is still not available? Can some one confirm this? Is there a work around?

 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/35664793-pass-a-parameter-s-to-th...

https://community.powerbi.com/t5/Report-Server/Power-BI-Embedded-and-Stored-Procedure-parameter-pass...

7 REPLIES 7
Anonymous
Not applicable

Did anyone manage to find solution for this scenario?

 

I end up in the same situtation, I am calling a stored procudure from PBI report and I need to pass dynamic user id to the stored procudure to perform data manipulation based on user id input and return results.

 

Unable to find any solution so far to pass dynamic user id to stored procedure from PBI report.

 

If anyone had solved this ploblem then please post the solution to help the community. Thanks in advance.

 

ibarrau
Super User
Super User

Hi. I don't think this will be available. If you want to capture the user login and manage everything in an embed, then you must buy Power Bi Embed capacity from azure to control this. That way you develop what you want to see and take the data you need. You can do RLS and much more. Embed by URL is just for the whole report. If you are using a publish to web then it won't ever have an url filter.

 

Hope this help,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

To make my question clear, I am talking about user ID in embedded URL the way like this

https://stackoverflow.com/questions/37986615/how-to-pass-parameter-to-powerbi-embedded-via-embedded-...

 

Then I want the user ID to work on a parameter of my stored procedure in azure database.

Good. But my answer is still the same. You can't get the logged user with embed url. That's why power bi embed is created, for cases you have to manipulate things. The embed url is just to keep it the way it is.

You send how to filter an embed url. I say that if you are with publish to web you can't do it but if you are embeding with the login you can filter. However filtering by url is not the same of getting data from it.

 

I'm sorry I don't think you can get that data unless you have Power Bi Embed capacity.

Regards,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Yes I do have power BI embedded. As what I said in my question, 'I have some reports embedded in my application.

 

My questions is, all the cases I saw online, they use this to filter on a table column, not to pass this value to a parameter in a stored proc. Does it work for a stored procedure?

I'll ask to my mates here to help. I can't see the idea of the store procedure. You can use a store procedure as datasource in a power bi report, but executing it from code won't make any difference for the power bi. Power bi manage its own flow of data. That is why you filter it by url or manage roles wihin the embed.

 


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Yes I use stored proc as data source. But it is a stored proc with a user ID parameter. Thanks.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors