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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tuken
Frequent Visitor

Dataflows: Basic Auth with blank password

I have a dataset that works fine in Power BI Desktop but not in Dataflows. It has a source that connects to a rest api . API key is used as the username and the password is left blank.

 

When I copy the dataset to dataflows this error message appears:

"The given credential contains a property with a null value. Data source kind: Web. Property name: Password."

 

How can I fix it?

Thanks!

1 ACCEPTED SOLUTION
pmichalc
Frequent Visitor

I found a solution to use Basic authentication without password!

You need to select anonymous authentication, and in the code paste this:
Source = Json.Document(Web.Contents(https://<yourpath.com>, [Headers=
[
#"Content-type"="application/json",
#"Authorization"="Basic <encoded username:>"
]]
)),

Use https://www.base64encode.org/ to decode, remember the colon at the end of the username is very important!

In PowerBI.com you have to set anonymous authentication with skip test connection.


Scheduled refresh works for me this way!
Of course, I also use the Personal Gateway on PowerBi.com

More information: 
https://www.linkedin.com/pulse/dataflows-power-bi-sonarqube-sonarcloud-api-basic-auth-michalczyk

View solution in original post

5 REPLIES 5
pmichalc
Frequent Visitor

I found a solution to use Basic authentication without password!

You need to select anonymous authentication, and in the code paste this:
Source = Json.Document(Web.Contents(https://<yourpath.com>, [Headers=
[
#"Content-type"="application/json",
#"Authorization"="Basic <encoded username:>"
]]
)),

Use https://www.base64encode.org/ to decode, remember the colon at the end of the username is very important!

In PowerBI.com you have to set anonymous authentication with skip test connection.


Scheduled refresh works for me this way!
Of course, I also use the Personal Gateway on PowerBi.com

More information: 
https://www.linkedin.com/pulse/dataflows-power-bi-sonarqube-sonarcloud-api-basic-auth-michalczyk

FYI you can also do binary encoding within powerbi:

Binary.ToText(Text.ToBinary("your username:"), 0)


Update: Updated to reflect Ibendlin's comment about the colon. 

Don't forget the colon.

lbendlin
Super User
Super User

Have you tried to provide the password as an empty string instead?

Hi @lbendlin , thanks for your answer.

 

I've tried with "" in the password but it didn't work either.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors