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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
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
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 16 | |
| 12 | |
| 12 | |
| 7 | |
| 6 |