Forum Discussion
Guide to Implementing 3-Legged OAuth in Power BI Custom Visual
- 1 year ago
Hi Vishnu_G ,
Power BI does not provide a supported way to pass the access token from a custom connector (M extension) to a custom visual.
This is by design:
-
The access token lives in Power Query's credential store and is never exposed to the model or visuals.
-
Even if you return it as part of the dataset (e.g., in a column), it is considered a sensitive field and will be encrypted or stripped when published to the Power BI Service.
The other option is using the authentication API, but it is only available for certified visuals and also is only compatible with backends that use Entra ID authentication.
Additionally, you can follow
Custom Development Discussions to get an idea about your query.-
https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/bd-p/CustomVisualsDevelopmentDiscussionAnd a smililar issue-
https://community.fabric.microsoft.com/t5/Developer/Authentication-API-with-Organizational-Custom-Visual/m-p/4634659
Hope this helps!
If you find this post helpful, please mark it as an "Accept as Solution" and give Kudo. Feel free to reach out if you need further assistance.
Thanks and Regards -
Thanks for the clarification.
To follow up:
Are there any examples or references available where the 3-legged OAuth flow was hosted externally and the resulting token was then passed into a Power BI custom visual (e.g., via parameters, dataset, or other means)? I’d really appreciate seeing a working approach.
I’ve developed a custom connector that handles 3-legged OAuth authentication. Is there any way to access or use that token in a Power BI custom visual?
Or is the token strictly isolated to the connector and not accessible by visuals