Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi PowerBI Community,
I have a few semantic models (sourced from AWS/GCS and not via. Gateway) that are not owned by Service Principal. My goal is to programmatically change some parameters that the semantic models are using and then apply the change, and these are the steps I took:
But on step 3, I always receive the following message, and most of the dataset settings are greyed out.
"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."
Does anyone know another way to change and apply the new parameter using REST API, or solve the refresh issue on step 3 (maybe allowing Service Principal to refresh any semantic models regardless of the ownership in the workspace)?
Best regards
Hi @fxs7576_02 ,
Base on your description, it sounds like you're running into an issue with data source credentials after you update the parameters and try to refresh the dataset. Please check if the service principal hit the following limitations:
In addition, the following link is the one which has the similar problem as yours. Hope its solution can help you solve the problem.
Solved: Dataset refresh error Service principal - Microsoft Fabric Community
Best Regards
Hi @v-yiruan-msft ,
I don't think the Service Principal is facing those limitations.
When I looked at the solution in Solved: Dataset refresh error Service principal - Microsoft Fabric Community thread, they used the endpoint to update the datasource credential for Gateway.
$BounGateway=Invoke-PowerBIRestMethod -Url "groups/$($workspace.id)/datasets/$($datasetid)/Default.GetBoundGatewayDataSources" -Method GET | ConvertFrom-Json
I'm not yet familiar with gateway connection. Is the above endpoint still relevant if I use a personal cloud connection (i.e. RDS MySQL) as opposed to gateway?
Your process is missing a step. After a semantic model takeover all data source credentials are removed and need to be reapplied.
Datasets - Update Datasources In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Thanks @lbendlin .
After the 'Takeover Dataset' step, I tried the Datasources Update endpoint
with the following request body:
{
'updateDetails': [
{'datasourceSelector':
{
'datasourceType': 'MySql',
'connectionDetails': {
'server': 'demo_server_01',
'database': 'demo_database_01'
}
},
'connectionDetails': {
'server': 'demo_server_01',
'database': 'demo_database_01'
}
}
]
}
But received the following message:
{"error":{"code":"InvalidRequest","message":"The given connection details for selector # are invalid"}}
Is there any information in the request body that I need to add or modify?
Did you ever manage to find the solution to this?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.