Problem with JIRA API while connecting to Power BI which was working previously

Venkatesh Perumal May 25, 2023

I used to get data from JIRA through API and built reports in Power BI. However I am getting "Expression.Error: Access to the resource is forbidden." error while trying to connect. I have created data source credentials and entered it again but still getting the same issue. Can anyone please help me on this?

Sample code below in the Advanced Editor:

let
Source =Json.Document(Web.Contents("https://enterprise-jira.companyname.net/rest/api/2/search?jql=Project='Project name'&maxResults=1000"))
in
Source

1 answer

0 votes
Graham Twine
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 29, 2023

@Venkatesh Perumal,

 

There are any number of reasons why this has started failing.

Some things you may consider checking in the first insantce are:

1. Can the account using the API still access Jira from something like Postman or Insomnia or Curl

2. Do you see failed authentications from this account in the Jira security log

3. Is the JQL returning anything in the UI

4. Can you see anything in Power BI ( I have no knowledge of Power GI at all)

5. Has rate limiting been enabled in Jira

Venkatesh Perumal May 31, 2023

@Graham Twine Thanks for your response. I have checked the API in Postman and found like basic authentication has been disabled on the API instance. So I have changed my authentication to Bearer token and the API call works now in Power BI.

Like Graham Twine likes this
H Shah October 17, 2023

Hi @Venkatesh Perumal do u mind sharing how do i change the authentication to bearer token?

thanks!

Venkatesh Perumal October 24, 2023

HI @H Shah Sorry for delay. Here is an example.

Json.Document(Web.Contents("https://<jira url>/rest/api/2/search?jql=Project='Test'&maxResults=10000", [Headers=[Authorization="Bearer <token>"]]))

Suggest an answer

Log in or Sign up to answer