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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors