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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Houghs_Gwk
Frequent Visitor

Unable to refresh data when Service Princpal owns dataset

Hi!

 

We are currently encountering a situation that the dataset cannot be refreshed when it is owned by Service Principal. When we try to click "Refresh", it gives the message:

 

Data source errorScheduled refresh is disabled 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. Then reactivate scheduled refresh.

 

 

Also, due to the owner of the dataset is Service Principal, the UI of dataset setting is greyed out, the credentials cannot be edited here.

Houghs_Gwk_0-1658908521556.png

So we are trying to use REST API to update the datasource credentials. We are following the document shared by @Jayendran. Everything works well until the last step of Updating credentials.

 

Summary of our situation:

  1. The data source is Cloud source which stored on Google storage, so the credential we use is "Anonymous".
    Is this correct?

 

$UpdateUserCredential = @{ 
            credentialType = "Anonymous"
            credentials = "{`"credentialData`":`"`"}"
            encryptedConnection = "Encrypted"
            encryptionAlgorithm = "None"
            privacyLevel = "Organizational"
            skipTestConnection = "True"

} | ConvertTo-Json ​

 

 

  • The application permission we are using are all available except for Tenant.Read.All & Tenant.ReadWrite.All.Houghs_Gwk_1-1658909186465.png
  • The refresh function works when we just take over back the dataset, and check the "Skip test connection".
  • Updating data source credentials does not work and gives error (Invoke-PowerBIRestMethod: One or more errors occurred. (Response status code does not indicate success: 400 (Bad Request).)).  

 

Invoke-PowerBIRestMethod -Url "gateways/$($BounGateway.value.gatewayId)/datasources/$($BounGateway.value.id)" -Method PATCH -Body $UpdateUserCredential | ConvertFrom-Json ​

 

 

  • There is no on-premise gateway since the datasource is on cloud, so we retreive the default gateway.

 

This issue has made our progress keep pending. Can anyone share how it can be solved? Thank you so much!

 

Houghs

 

 

 

2 REPLIES 2
lbendlin
Super User
Super User

What's your rationale for making the service principal the dataset owner?

Hi lbendlin,

We are using service principal for embedded (app owns data) as we have several workspaces to manage.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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
Top Kudoed Authors