Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
My report calls a webapi and authenticates using odata with bearer.
In the powerbi destop it works and the data is returned, but when it publishes in powerbi on the web I get the error.
Here part of the code that works on pbi desktop.
let url = "<URL>", GetJson = Web.Contents(url, [ Headers = [#"uuid"="0", #"modelo"="powerbi", #"so"="powerbi", #"versao"="powerbi", #"tokenfirebase"="powerbi", #"Content-Type"="application/x-www-form-urlencoded;charset=UTF-8"], RelativePath="/<partial url>/token", Content = Text.ToBinary("grant_type=password&username=USER&password=PASSWORD"), Timeout = #duration(0,0,5,0) ] ), FormatAsJson = Json.Document(GetJson), AccessToken = FormatAsJson[access_token],
In pbi online it generates the error
"Your data source can not be updated because the credentials are invalid. Please update your credentials and try again."
Authentication is anonymous.
I've tried all kinds of authentication none works
Please I need help
Hi @sgargeta,
Is the web content public available? Maybe you can get it from your local network, while the Power BI Service can't get it from the public Internet.
Secondly, the authentication is anonymous, but you hardcode the username and password. Right? If it's possible using Power BI to do this.
Thirdly, did you check the settings of dataset in the Power BI Servcie?
If it's possible for you to post the name of the API you are using, I could do some tests.
Best regards!
Dale
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
60 | |
32 | |
27 | |
22 | |
22 |
User | Count |
---|---|
63 | |
49 | |
28 | |
24 | |
19 |