Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all
I was in the process of building several custom connectors for various APIs that use delegated (authorization code) OAuth flow to authenticate to Azure AD. After following Microsoft's example code (DataConnectors/samples/MyGraph at master · microsoft/DataConnectors (github.com)) I managed to get everything working, but I was hoping to consolidate some of the OAuth functions into a custom function library instead of having the same code repeated in each custom connector.
So to test this, I created a function in my custom function library and then tried to call it from one of my custom connectors. Unfortunately this stops the custom connector from loading in Power BI. I also tried to call a shared function that was declared in another custom connector and this also prevents the custom connector that was calling the function from loading.
So my assumption here is that calling a custom function that is not declared within the custom connector itself doesn't work and invalidates the custom connector. So I am wondering, is there any way to re-use custom function code across custom connectors (i.e. can a custom function be dependent on code in another custom function/function library), or is copy-pasting code the only option?
Hi @rc_ross ,
Not familiar with the custom connector but the custom connectors should be independent since they are 'custom', instead of a partent-child functions which could be inheritted or overrided as far as I know.
Perhaps you have better copy-pasting the code to create custom connectors if they have the similar logic or structure.
Best Regards,
Community Support Team _ Yingjie Li
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 8 | |
| 7 |