Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Everyone, thanks for your help.
I am trying to load a Rest Api that you will be able to see at the end of the text through a power Query that I used to load the data to my power bi Dashboard. I was able to pull the data from the rest api to the power bi report using anonymous connection and ignoring privacy levels from power bi Query and desktop. It refreshes fine with a manual refresh and it loads all the data properly.
But the issue is that when I load it to Power BI Service, it does not authenticate the credentials in any way and I have also been getting the error messages below depending on the combination of privacy levels I use, I've tried them all. THe rest api is created on a postgre data base and it requires a bearer token to be pulled, I would really appreciate your guidance on a suggestion to load the query properly so I can authenticate either using anonymous or web api, but currenlty none works because anonymous does not authenticate also if I try power bi service and web api says 'need an api key name to be able to use an api key'.
Please guide me how to solve this I've been reading about creating custom connectors but I am not aware of to do it, or perhabs I can have the team that works on the api modifying the rest api configuration so it better fits power bi, any help is appreciated.
Here you can find the most recurrent errors I'm getting related to an issue with the Authorization header and privacy levels.
*Error1
Data source error: [ValidateMarkupTags][ccon]Expression.Error: The '[ccon]Authorization[/ccon]' header is only supported when connecting anonymously. These headers can be used with all authentication types: [ccon]Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer[/ccon]. [/ccon]. The exception was raised by the IDbCommand interface. Table: it changes
Time: 2023-09-27 15:27:02Z
*error2
Information is needed in order to combine data. Please specify a privacy level for each data source.;Information about a data source is required.. The exception was raised by the IDbCommand interface. Table: itchanges.
*Rest api general specifications and header*
curl --location --request GET 'Corplinkhereurl \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer APIKEY*
*
*Query*
let
Source = Json.Document(Web.Contents("mycorplink",
[Headers=[Authorization="Bearer myapikey]])),
#"Converted to Table" = Table.FromRecords({Source}),
#"Expanded data" = Table.ExpandListColumn(#"Converted to Table", "data")
in
#"Expanded data"
you are missing the closing double quotes after the token. Also note that a JWT and an API Key are techincally different things. It is rather unusual to use an API key as a token.
This issue was solved by turning the bearer authentication into a token in the header authentication directly from the API, notice from my research if you want to connect a bearer token you have to use a custom connector otherwise the rest api configuration must be modified.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
10 | |
8 | |
7 | |
6 | |
6 |