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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
dattapawar
Regular Visitor

Prompt user to provide the credentials

I would like to show the a prompt/popup/daialouge box that will ask user to provide the credentials.

 

I am using power bi desktop and powerbi cloud service.

I am working on a report that collects data from rest api, which needs to be autheticated.

I have created two parameters UserName and Password and using same within power query. 

Here is the query I have formed. In the data source settings I have set the authetication as Basic.

 

let
Source = Username & ":" & Password,
Bytes = Text.ToBinary(Source),
TextForm = Binary.ToText(Bytes, BinaryEncoding.Base64),

url = "API URL",

GetJson = Json.Document(Web.Contents(url,
[
Headers = [#"Content-Type"="application/json",#"Authorization"="Basic " & TextForm]

])),

#"Converted to Table" = Record.ToTable(GetJson),
Value = #"Converted to Table"{2}[Value],
#"Converted to Table1" = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table1", "Column1", {"Id", "Name", "Salary"},
{"Column1.Id", "Column1.Name", "Column1.Salary"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded Column1",{{"Column1.Id", "EMPID"}, {"Column1.EMPName", "EMPName"}, {"Column1.Salary", "Salary"}})
in
#"Renamed Columns"

 

While refresh the report or reopen of report, no prompt box is there. I observed that query stores the user name and password provided in datasource settings.

 

Is there a way  to prompt the user for credentials and get the provided input into paramaters? like username and password.

5 REPLIES 5
dax
Community Support
Community Support

Hi dattapawar,

As I know, when use built-in connector, you will pass and store the credential in dataset, you couldn't achieve this goal currently. You might need to create the custom connector to see whether it work or not. Or you could ask super users in forum for more suggestions.

 

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thank you for the reply.

 

Please provide the link(s) where I could learn on Custom connector creation.

 

zoloturu
Memorable Member
Memorable Member

@dattapawar ,

 

You can't have a dialog box in Power BI Desktop and Service.

The only option is to create two parameters UserName and Password and use them in your PowerQuery code. And once user wants to use your report he can go to Edit Parameters menu in Desktop and enter them. 

 

See where located edit parameters in Desktop and Service - https://docs.microsoft.com/en-us/power-bi/service-parameters.

 


Regards,
Ruslan Zolotukhin (zoloturu)
BI Engineer at Akvelon Inc. / Kharkiv Power BI User Group Leader / DAX & Power BI Trainer
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
It was useful? Press Thumbs Up!

You are from Ukraine? If yes then welcome to Power BI User Group - KhPUG website. Other country? Check and find proper one - Power BI User Groups

Thank you for the reply.

 

I do have UserName and Password as parameter. While creating parameter if I make parameter as required, parameter has to have value at design time only. Later on power bi doesn't prompt for parameter input. Seems the parameter values are static in power bi.

It means that without providing any input user could see the report and which not good practise.

 

Moreover end user would be non-techi guys, so I do not wanted to drag them to edit the parameter values.

 

Please let me know if you have more pointers.

 

Thanks aagain ! 

Did you find an answer to this? I have the same problem.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.