Forum Discussion

Dev_Syndell_12's avatar
Dev_Syndell_12
Regular Visitor
1 year ago

Dataset refresh failing

Problem Statement: I created a REST API that is responsible for updating the data source of the specific report and then refreshing it.

API to update the datasource:

https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/Default.UpdateDatasources

API to refresh the dataset:

https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshes

When I try to refresh the dataset, I get some credentials-related error:

The refresh failed for this model. Expand the technical details for more info.Hide details
Data source error:  It looks like scheduled refresh failed because at least one data source is missing credentials. To start the refresh again, go to this dataset's settings page and enter credentials for all data sources.
Cluster URI:    WABI-INDIA-CENTRAL-A-PRIMARY-redirect.analysis.windows.net
Activity ID:    00000000-0000-0000-0000-000000000000
Request ID: ff70b198-de5a-4572-b36f-78858b062ef3
Time:   2024-12-09 05:52:16Z

Under the Data source credentials section in the settings page, I get this error: Failed to test the connection to your data source. Please retry your credentials. Learn more

After this, I have to enter the credentials manually (after every request).

Is there any way to persist these credentials?

Additional Information:

The report is created using a REST API (Laravel API endpoint) as a source.

Images of Semantic Model Settings page:

3 Replies

  • How are you authenticating against the API?  Connections like these usually require a custom connector.

    • Dev_Syndell_12's avatar
      Dev_Syndell_12
      Regular Visitor

      I just set up the gateway, which has "Basic" authentication; I didn't setup any other authentication.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks for the reply from lbendlin, please allow me to provide another insight: 
    Hi  Dev_Syndell_12 ,

     

    According to your question i description, you seem to want to realize the use of rest API update data source after the automatic update of data set credentials, but according to the rest API search, it seems that there is no direct update of data set credentials of the API, it should be due to the security of data privacy considerations, there is no design of the launch of this API, but according to my understanding, you can set up the data source for the data set credentials, so that the data source before and after the update can be accessed normally, this seems to be the case that this API should be realized according to the logic of the situation. So that the data source before and after the update can be accessed normally, which seems to be the logic of this API should be realized in accordance with the situation.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.