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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
PhilSteel
New Member

OData passing Data from Embed

Hi

I'm getting started with integrating with Power BI Embedded.

 

Our Application has an ODATA (Also a Rest Endpoint) endpoint which returns data based on a users permissions both row based and column based permission using extensive logic based on Roles, Features Enabled, Data Access Rules etc which cannot be fulfilled by RLS in Analysis Services so we need to use this.

 

The OData endpoint uses a Bearer token for Authentication which is generated by our application.

We need to pass this Bearer Token in the Embed Token and then utilise it in the Query as shown below.


let
Source = OData.Feed("https://localhost:44321/odata", null, [Headers=[Authorization = "Bearer {REMOVED}"], ODataVersion=4, Implementation="2.0", OmitValues=ODataOmitValues.Nulls]),
Users_table = Source{[Name="Users",Signature="table"]}[Data]
in
Users_table

 

This Bearer Token can not be hardcoded into the query as it needs to change per user.

 

Can someone point me in the right direction.

 

Thanks

 

Phil

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @PhilSteel ,

 

This does not seem to be able to do that, because getting the data belongs to the model level. For reports, it will only have one dataset, regardless of how many users you have.


If follow your logic, the dataset will be refreshed every time a user logs in, and if multiple users log in to the report at the same time, it will cause the dataset to be refreshed, resulting in inconsistent data, with the next user's refresh overwriting the previous user's data.

 

Pwoer bi report accesses the dataset and fetches data according to the defined dax, so you need to refresh all the data that all users may use into the dataset and present different data according to the user's token.
If rls does not meet your needs, you can try OLS in power bi.

Analysis Services tabular model object-level security | Microsoft Docs

 

Best Regards

Community Support Team _ chenwu zhu

 

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

View solution in original post

1 REPLY 1
v-chenwuz-msft
Community Support
Community Support

Hi @PhilSteel ,

 

This does not seem to be able to do that, because getting the data belongs to the model level. For reports, it will only have one dataset, regardless of how many users you have.


If follow your logic, the dataset will be refreshed every time a user logs in, and if multiple users log in to the report at the same time, it will cause the dataset to be refreshed, resulting in inconsistent data, with the next user's refresh overwriting the previous user's data.

 

Pwoer bi report accesses the dataset and fetches data according to the defined dax, so you need to refresh all the data that all users may use into the dataset and present different data according to the user's token.
If rls does not meet your needs, you can try OLS in power bi.

Analysis Services tabular model object-level security | Microsoft Docs

 

Best Regards

Community Support Team _ chenwu zhu

 

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors