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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
mgray1998
Regular Visitor

An error occurred while processing the data in the semantic model.

Hi there,

 

I keep receiving this error with a few of my reports: An error occured while processing the data in the semantic model. Failure details: The last refresh attempt failed because of an internal service error. This is usually a transient issue. If you try again later and still see this message, contact support. <ccon>DataSource.Error: Web.Contents failed to get contents

 

This causes them to fail to refresh. For context, I am mainting reports that were created by someone else. My data sources are APIs connected through the web with an anonymous  authentication method and privacy level set to public. To fix the issue, I have just been editing the data credentials daily and saving the same credentials without changing anything (basically just refreshing the same credentials). However, I don't want to continue to have to do this everyday. Is there a better long term solution? 

 

I believe the issue might lay with the API itself but our developer doesn't seem to agree. 

1 ACCEPTED SOLUTION
andrewsommer
Super User
Super User

I think you are right that the most likely issue is the API itself.  Even if the developer is skeptical, it’s common for publicly accessible APIs to intermittently:

  • Throttle requests (rate limiting).
  • Fail due to timeout or heavy load.
  • Return malformed or incomplete responses.

The fact that re-entering the same credentials "resolves" the issue supports this; your manual refresh is essentially retrying the call, which eventually succeeds.

Anonymous APIs often lack SLA guarantees or proper headers, and Power BI doesn’t retry Web.Contents fetches automatically.

The other likely situation is a service timeout.  If the API call is complex (e.g., has dynamic parameters, headers, or paging logic), Web.Contents may not fully fold or may exceed timeout thresholds.

 

If you are ingesting straight into a semantic model, I would encourage you to set up your ETL through dataflows and then ingest those flows into the semantic model.  At a minimum this will isolate the refresh failures to the query and not make the whole model refresh fail.

 

You could also try to wrap Web.Contents with a try...otherwise 

let
    Source = try Web.Contents("https://your.api.url/endpoint") otherwise null
in
    Source


Please mark this post as a solution if it helps you. Appreciate Kudos.

 

View solution in original post

2 REPLIES 2
johnbasha33
Super User
Super User

 @mgray1998 
Possible long-term fixes:

  1. Use a proper Authentication method (if available)

    • If the API supports a key/token, switch from anonymous to that.

    • Tokens often refresh automatically or have longer validity.

    • Cache or stage API data in a database or data lake

      • Instead of Power BI calling API every refresh, build a scheduled ETL process (e.g., Azure Data Factory, Logic Apps) to pull API data and save it in SQL or Blob storage.

      • Power BI then reads from that stable data source, reducing API failures.

      • Set Privacy Levels Carefully

        • Ensure all sources involved use compatible privacy levels.

        • Avoid mixing Public with Organizational or Private sources in the same query.

        • Error handling in M Query

          • Use try ... otherwise to handle API errors gracefully and avoid refresh failure.

          • Example:

            Source = try Web.Contents("your API URL") otherwise null
          • This won’t fix the root cause but can avoid refresh breaks.

          • Scheduled Refresh Settings

            • If using Power BI Service, try to stagger refreshes to avoid API throttling.

            • Also consider incremental refresh to reduce load.

            • Monitor API health/logs

              • Track API uptime and response times (there are monitoring tools for this).

                This helps argue with developers if the API really has issues.

                Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!

@mgray1998

andrewsommer
Super User
Super User

I think you are right that the most likely issue is the API itself.  Even if the developer is skeptical, it’s common for publicly accessible APIs to intermittently:

  • Throttle requests (rate limiting).
  • Fail due to timeout or heavy load.
  • Return malformed or incomplete responses.

The fact that re-entering the same credentials "resolves" the issue supports this; your manual refresh is essentially retrying the call, which eventually succeeds.

Anonymous APIs often lack SLA guarantees or proper headers, and Power BI doesn’t retry Web.Contents fetches automatically.

The other likely situation is a service timeout.  If the API call is complex (e.g., has dynamic parameters, headers, or paging logic), Web.Contents may not fully fold or may exceed timeout thresholds.

 

If you are ingesting straight into a semantic model, I would encourage you to set up your ETL through dataflows and then ingest those flows into the semantic model.  At a minimum this will isolate the refresh failures to the query and not make the whole model refresh fail.

 

You could also try to wrap Web.Contents with a try...otherwise 

let
    Source = try Web.Contents("https://your.api.url/endpoint") otherwise null
in
    Source


Please mark this post as a solution if it helps you. Appreciate Kudos.

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors