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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
vikas-jk
Regular Visitor

How to get a value from user input using MQuery and Visual Studio

Hello,

 

As I am new to MQuery, I would like to know how can I get a custom input value from user when creating Custom Connector for Power BI using Visual Studio and MQuery.

 

Like we ask for user credentials using

 

CheckHeaders = [
    Authentication = [
        UsernamePassword = [
            UsernameLabel="companyid",
            PasswordLabel=" privatekey",
            Label="API User Credentials"]
    ],
    Label = "Manage"
];

 

How Do i add a new input value Like "last page number" which I need to pass to CheckHeader.Content and get it from user?

Need MQuery code, thanks.

3 REPLIES 3
lbendlin
Super User
Super User

Power Query does not allow support user input. You can try with R script as one of the transforms but I doubt that will work on the Power BI desktop. It definitely will not work on the service.

So, There is no way to get Custom user value, like we get OAuth values in Custom Connector as shown below

Username=Extension.CurrentCredential()[UserName],
Password=Extension.CurrentCredential()[password]

What If I want to limit the number of page call, when I am calling api which has more than 500 pages ( 25 records per page )and I need only first 10 pages?

 

 

use a different tool for the API calls.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors