Forum Discussion

lakedrivedirect's avatar
lakedrivedirect
New Member
1 year ago
Solved

Data refresh error - Unable to access some data source because the artifact is missing

Hello Power BI Community,    I am facing this data refresh error as below ( randomly). This is cloud connection to SQL database using service principal - I am using any gateway. what am I missing h...
  • v-hashadapu's avatar
    1 year ago

    Hi lakedrivedirect , Thank you for reaching out to the Microsoft Community Forum.

     

    The randomness suggests token caching or an expired secret. Go to Azure Portal, under Entra ID -> App registrations -> Your service principal -> Certificates & secrets, and check the client secret’s expiry. If it’s old or near done, generate a new one. Then, in Power BI Service, hit Dataset Settings -> Data source credentials, and update it with the new secret. If the UI won’t let you, use the REST API: send a POST to https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/datasources with {"credentialData":[{"name":"clientId","value":"your-client-id"},{"name":"clientSecret","value":"new-secret"},{"name":"tenantId","value":"your-tenant-id"}]}. This rebinds the credentials explicitly and kills any caching quirks. Try a refresh after, it’ll work.

     

    Next, let’s fix any dataset misalignment, since “missing connection details” often means the dataset’s lost its link to the data source. Open your PBIX in Power BI Desktop, head to Data Source Settings, and verify the SQL connection works with the service principal. Republish it to the Power BI Service to overwrite any stale configuration. Then, in the service, go to Settings -> Data connections, ensure the connection’s listed and link it to your dataset if it’s not. This forces a clean binding, and your refreshes will stabilize immediately.

     

    If the above don’t fully solve it or you suspect a Power BI service glitch in the North Central US cluster, In Power BI Service, check Dataset -> Refresh history for exact error codes. For a rock-solid test, run this PowerShell snippet to trigger a refresh and log details: $workspaceId = "<your-workspace-id>"; $datasetId = "<your-dataset-id>"; Invoke-PowerBIRestMethod -Url "groups/$workspaceId/datasets/$datasetId/refreshes" -Method POST. If it’s a regional hiccup, publish the dataset to another region and retry. This pins down any service-side issues, but the first two steps should already resolve it.

     

    If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
    Thank you.