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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jyotiraditya12
New Member

Pass URL from user input to StartLogin Method in OAuth authentication

Hi,

 

I am building a custom connector to connect to our API via OAuth2. This is so we can use our api as a data source to powerbi.

I need a parameter to construct Authorize URL  as input from the user. It's called domain URL in ui. How do I pass domain URL to StartLogin function?

 

I basically need these one variables to construct . Any references would be helpful too.

 

Thank you in advance.

Jyotiraditya

2 REPLIES 2
EHP
Advocate I
Advocate I

@jyotiraditya12 Did you find a solution to this?  I've just started looking into this for my own code.  Currently having to produce 2 custom connectors - one pointing at dev environment, the other at production.

 

I'm hoping I can have the one connector file with a specifiable environment name! 🤞🏻

v-lid-msft
Community Support
Community Support

Hi @jyotiraditya12 ,

 

Sorry for that we did not find a sample to add input box in the UI sample , but here is a thread about dorp list in UI you  can refer : https://community.powerbi.com/t5/Desktop/Custom-Data-Connector-UI-Dropdown-list/td-p/484102

https://docs.microsoft.com/en-us/power-query/handlingdataaccess#publish-to-ui

 

Then the result sohuld be used in the function, please refer to the documnet about oauth flow:   https://docs.microsoft.com/en-us/power-query/handlingauthentication#implementing-an-oauth-flow


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.