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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Web API data source refresh issue

Hi Team,

 

I have created a web api which validates the http header and gives the response in Json format. I have added this api as a data source for a report in power bi desktop which is working fine. But when i publish the report to powerbi.com it fails the data refresh with an exception "Invalid Credentials" and the configured header value is not available in the data connection. need help in fixing this issue

 

Thanks 

Sowjanya

Status: New
Comments
Rashmi1
Frequent Visitor

Hi cecyarmida ,

 

Thanks for the blog !

 

I am facing similar issue in the power Bi service but I am connecting to the JIRA Rest API

https://ulatlprod01.atlassian.net/rest/api/2/search?jql=project=%22ITTE%22&startAt=0&maxResults=1000

 

The problem I am facing is although I enter my JIRA credentials correctly it doesn't go through . Also I notice that the url in the attached screenshot is :

https://ulatlprod01.atlassian.net/rest/api/2/search?jql=project=%22ITTE%22&startAt=0&maxResults=1000/rest/api/2/search

When I run the first url directly in the browser , I get some code but when I run the second url it says not found.

 

I do not know how the suffix (highlighted in red) is coming. Any thoughts on how to fix this issue.

 

Thank you,

Rashmi

 

 

 

 

cecyarmida
Frequent Visitor

Rashimi, did you manage to connect to Jira?

Anonymous
Not applicable

This is happening to me to. Auth works on desktop but fails in the service with "Your data source can't be refreshed because the credentials are invalid."

 

I am using Csv.Document(Web.Contents(url, [Headers=[Authorization="Bearer ...", #"Content-type"="application/x-www-form-urlencoded",#"Accept"="text/csv"]]))

 

Appears that power bi service is attempting to authenticate anonymously with the API url without sending the headers.

zaynas
New Member

Hello,

Is there any update on this issue? Is there a reference ticket we can check status on at another webpage?

 

This issue is killing me and blocking a nearly perfect solution. I am trying to display a dashboard of Jira data in MS Teams but the fact that I cannot schedule a refresh is hugely inconvenient and defeats the purpose of the dashboard. As noted above, there is a bug with the way the data source is called to where it adds text onto the request URL "/rest/api/2/search" which causes a 400 error to return from Jira and thus "authentication fails" in the power bi service.

 

The URL itself is open and does not require authentication, therefore neither should Power BI.

 

Please, please prioritize this bug!

 

Thank you.

Anonymous
Not applicable

Hi Everyone,

 

Please check the following way to resolve this issue:

1. install on-premises Data Gateway

2. in a Gateway config, add a web data source with the URL for your API

3. add this gateway to the dataset in use

4. Use anonymous credentials to configure the data source. It may not work immediately - just reload the page several times.

 

You are good to go. Please let me know if it worked for you.

Anonymous
Not applicable

I was able to make it work by checking the 'Skip test connection' option when setting up the 'Data source credentials'. My setup is a REST API  with header values. The URL is the one used on the desktop, authentication method = Anonymous. No gateway needed.

 

Capture.PNG

Anonymous
Not applicable

Hi @Anonymous , where did you find the option "Skip test connection"?

Thank you

Anonymous
Not applicable

Hi @Anonymous , seems to be unavailbale for me as well, although this post says it should be there:

https://powerbi.microsoft.com/en-us/blog/skip-test-connection-for-on-premises-and-cloud-data-sources/

Anonymous
Not applicable

@Anonymous Thank you, I can't see it for the moment. I imagine it will be deployed to all users in the following days.

Cripp87
Regular Visitor

I am having a similar issue. I have connections to SharePoint lists (OData) and OneDrive-hosted xlsx/csv files. The SharePoint lists have no issues, but the xlsx/csv files (shown as 'Web' in the Data Source Credentials section) will not authenticate.

 

Refreshing them in Desktop works fine. I need this report to schedule refresh in Service as it is used throughout the day. I am connecting with an organizational account. I have tried storing the files on my work OneDrive and the SharePoint site where the lists exist but I get the same issue.

 

As the image shows, Power BI informs me I don;t need a Gateway as all data is in the cloud.

 

error.PNGgateway.PNG