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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Vishnu_G
Frequent Visitor

Guide to Implementing 3-Legged OAuth in Power BI Custom Visual

Hi everyone,

I'm developing a custom visual for Power BI and I’d like to implement Autodesk’s 3-legged OAuth (user login flow) within it. The goal is to allow users to authenticate via Autodesk directly from the visual.

Specifically, I’m looking for Triggering Autodesk’s 3-legged authentication flow from the custom visual.

Has anyone tried integrating an external OAuth flow like this in a custom visual?
Is it possible within the Power BI framework, or are there known limitations/workarounds?

Any insights or suggestions would be greatly appreciated.

Thanks!

1 ACCEPTED SOLUTION
v-sdhruv
Community Support
Community Support

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/CustomVisualsDevelopmentDi...

And a  smililar issue-
https://community.fabric.microsoft.com/t5/Developer/Authentication-API-with-Organizational-Custom-Vi...

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

View solution in original post

8 REPLIES 8
v-sdhruv
Community Support
Community Support

Hi @Vishnu_G ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @Vishnu_G ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

Hi @Vishnu_G ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You

v-sdhruv
Community Support
Community Support

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/CustomVisualsDevelopmentDi...

And a  smililar issue-
https://community.fabric.microsoft.com/t5/Developer/Authentication-API-with-Organizational-Custom-Vi...

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

Akash_Varuna
Super User
Super User

@Vishnu_G 

  1. You can host the 3-legged OAuth flow in an external web service to handle Autodesk authentication. The resulting token can then be passed to Power BI using a custom connector. For implementation details, see Power BI Custom Connectors.

  2. While tokens are sandboxed, you can fetch authenticated data via the connector and pass it to the custom visual using datasets or parameters. The visual can then use this data to display relevant information. Refer to the below github link  Power BI Visuals Development for guidance.

@Akash_Varuna 

Just to clarify my use case:
I'm successfully getting data from an authenticated custom connector that uses Autodesk's 3-legged OAuth.

However, I also need to use the access token inside a custom visual, along with the data. Is there any way to pass the token to the visual from the connector, or any supported workaround that would allow the visual to reuse the token?

Appreciate any guidance on how this might be achieved within Power BI's constraints.

Vishnu_G
Frequent Visitor

Thanks for the clarification.

To follow up:

  1. 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.

  2. 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

Akash_Varuna
Super User
Super User

Hi @Vishnu_G  I don’t think Power BI custom visuals can directly handle 3-legged OAuth due to sandboxing and security restrictions. A workaround is to host the OAuth flow externally, then pass the resulting token to the visual via parameters or datasets Or to use a custom connector to manage authentication and fetch data securely. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors