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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
tamiribas
Resolver I
Resolver I

Report with an API call does not refresh from PBI Service

Hi,

I cannot get the report to refresh from the PBI Service.

It can be refreshed from the Desktop.

It seems I cannot Authenticate the call from the Service, even though all the authenticated parts are hard coded (Bearer Token).

 

Appreciating any help,

Tamir

 

let
  Source = Json.Document(
    Web.Contents(
      "https://api.enterprise.uefa.com/dmbo-partnerapi/v1/EventOccurrences/12345", 
      [
        Headers = [
          Accept = "application/json", 
          #"Ocp-Apim-Subscription-Key" = "123467890123456789", 
          Authorization
            = "Bearer fakeTokenABCBACBAC5353vxvxysxbjbhd"
        ]
      ]
    )
  ), 
  #"Converted to Table" = Table.FromRecords({Source})
in
    #"Converted to Table"

 

tamiribas_0-1693636399840.pngtamiribas_1-1693636460049.png

 

2 REPLIES 2
tamiribas
Resolver I
Resolver I

Thank you @Mahesh0016 for the suggestions.

I tried them but was not successful.

 

Kind regards,

Tamir

Mahesh0016
Super User
Super User

@tamiribas  I hope this helps you. Thank You.

It seems like you are encountering an issue with refreshing data in Power BI Service while using a Bearer Token for authentication. To troubleshoot this issue, here are some steps you can follow:

1. **Check Dataset Credentials in Power BI Service:**
- Make sure you have configured the dataset credentials correctly in Power BI Service. You should have the Bearer Token entered as a valid credential.

2. **Data Source Permissions:**
- Ensure that the service account or user account you are using to refresh the dataset in Power BI Service has the necessary permissions to access the data source.

3. **Token Expiry:**
- Verify that the Bearer Token you are using hasn't expired. If it has, you will need to obtain a new valid token.

4. **Firewall and Network Settings:**
- Check if there are any firewall or network settings that might be blocking the Power BI Service from accessing the external API. Make sure the API is accessible from the Power BI Service environment.

5. **Error Messages:**
- Check if there are any specific error messages in the Power BI Service refresh logs that can provide more information about the issue. Look for any authentication-related errors.

6. **Gateway Configuration (If Applicable):**
- If you are using a gateway to connect to the data source, ensure that the gateway is correctly configured and running in the environment where the dataset is published.

7. **Test API Access from a Different Environment:**
- To isolate the issue, you can try to access the API using the same Bearer Token from a different environment (e.g., a local machine or another tool) to verify that the token and API access are working as expected.

8. **Token Validation:**
- Double-check that the Bearer Token is correct and has the necessary permissions to access the API.

9. **Bearer Token Format:**
- Ensure that the Bearer Token is in the correct format (it should start with "Bearer " followed by the actual token value).

10. **API Service Status:**
- Verify if the API service you are trying to access is operational and not experiencing any downtime or issues.

11. **API Rate Limiting:**
- Some APIs have rate limiting policies. Ensure that you are not exceeding the rate limits of the API.

12. **Token Security:**
- Make sure that you are not sharing or exposing sensitive token information in public spaces. Replace the token in your code example with the actual token when sharing.

By following these steps and troubleshooting each aspect, you should be able to identify and resolve the issue with refreshing data in Power BI Service using a Bearer Token for authentication. If the issue persists, consider reaching out to Power BI support for further assistance, as they can provide more specific guidance based on your environment and configuration.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.