Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi, I'm total new in Power BI.
I have a problem which I can't figure out so maybe one of you can assist me.
We have a wepAPI for which we use to support our customers workflow. To give our customers extra insight we would like to use powerbi but I'm running into some issues.
Currently our customers log in to our web application to read/write data for their organisation. This web application is then communicating with a webAPI. When loggin in, the webAPI creates a sessionid which is being send within the header every time a request is made. This sessionid is than being used within our API to restrict data access to that specific user.
What I would like to do is the following:
1. create a login page (to obtain the sessionid from our webAPI)
2. use that sessionid for every Power BI report request made to our webAPI
I hope I made my problem clear.
Is this a possibility in Power BI?
Thanks!
Ps. I'm not looking for a RLS solution.
Solved! Go to Solution.
Hi @celsius ,
To connect Power BI to a web API that requires a session ID for authentication, you need to implement a custom method where Power BI first obtains the session ID upon login and then includes it in the header of every API request.
Since Power BI does not provide a built-in interactive login page for custom authentication, this must be handled using Power Query (M language). The process involves sending login credentials to the API’s authentication endpoint, extracting the session ID from the response, and storing it for subsequent API calls.
Every request to fetch data must then include this session ID in the request headers to ensure proper authentication. Additionally, if the session expires periodically, you must implement a way to re-authenticate and refresh the session ID before making new API calls. This method ensures secure access to customer-specific data while leveraging Power BI for reporting and insights.
However, since Power BI does not natively support dynamic user authentication per session within a report, this approach is best suited for admin-managed datasets rather than end-user-driven authentication. If necessary, embedding Power BI within your web application using Power BI Embedded may provide a more user-friendly solution for seamless authentication.
Hi @celsius ,
To connect Power BI to a web API that requires a session ID for authentication, you need to implement a custom method where Power BI first obtains the session ID upon login and then includes it in the header of every API request.
Since Power BI does not provide a built-in interactive login page for custom authentication, this must be handled using Power Query (M language). The process involves sending login credentials to the API’s authentication endpoint, extracting the session ID from the response, and storing it for subsequent API calls.
Every request to fetch data must then include this session ID in the request headers to ensure proper authentication. Additionally, if the session expires periodically, you must implement a way to re-authenticate and refresh the session ID before making new API calls. This method ensures secure access to customer-specific data while leveraging Power BI for reporting and insights.
However, since Power BI does not natively support dynamic user authentication per session within a report, this approach is best suited for admin-managed datasets rather than end-user-driven authentication. If necessary, embedding Power BI within your web application using Power BI Embedded may provide a more user-friendly solution for seamless authentication.
That sessionid is meaningless to Power BI. You would need to implement all the security in your embedding framework. You are using Power BI Embedded, right?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.