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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Dynamic Rest API Query Based on Authenticated User

Hello everyone, 

 

I've done a bit of digging but can't seem to find a solution that should theoretically be simple. Long story short is I'm working on a client portal that pulls data from various data sources (SentinelOne, Proofpoint, etc.) using a veriety of APIs. All of these data sources will require unique perameters such as siteid, clientid, etc. based on the client/person looking at the dashboard.

 

My idea was to spool up an SQL server with each client's email address and the unique identifiers for that client, for each specific data source. When the user authenticates to the embedded power bi report with their email address, powerquery pulls the uniqie identifiers based on the authenticated client's email and then plugs in those values when making the API calls to all the data sources. 

 

1. Is this possible, and if so is this a reasonable solution?

2. How do I determine the authenticated user and/or other unique identifiers that I can cross refrence? I saw DAX funtions but couldn't find anything power query related. 

 

Thank you in advance!

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

I think this is not possible. As your data sources are various APIs, you can only use Import mode to connect to them. With Import mode, you need to connect to data sources and import data into the data model of your report first. Then you can use these data from the data model to create a report. When your users view this report, the data they see is loaded from the data model rather than from the data sources. So you cannot identify the users' email addresses and use them to query data from the data sources. 

 

Hope this helps. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Bumping to clarify my question. Really all I need to know is if it possible to get some sort of unique identefier from the person viewing the report and put it in a variable. 

Hi @Anonymous 

 

I think this is not possible. As your data sources are various APIs, you can only use Import mode to connect to them. With Import mode, you need to connect to data sources and import data into the data model of your report first. Then you can use these data from the data model to create a report. When your users view this report, the data they see is loaded from the data model rather than from the data sources. So you cannot identify the users' email addresses and use them to query data from the data sources. 

 

Hope this helps. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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