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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jimmcslim
Helper III
Helper III

How to set credentials for Azure Table Storage via Gateways.UpdateDatasourceAsync

I am trying to provide the credentials for an Azure Table Storage datasource via the Power BI API (specifically the Nuget package). I have successfully done this for Azure SQL, but I'm not sure what the serialized credentials provided to the CredentialDetails.Credentials property should be...

 

{"credentialData": [ {"name":"accountkey", "value":"my account key here - support for SAS signatures would be great!"}]}

 

I have tried every combination of accountkey, Account Key, account-key, etc under the sun - although I have tried them all in one request - hoping that the backend would ignore the redundant data. But I keep getting a BadRequest error from the backend. I have also set the value of the CredentialDetails.Key property to "Key". I'm making these assumptions off the basis of what the 'Data source credentials' property pages look like on the Power BI service itself.

 

Are these datasource-specific credential schemas documented anywhere?

 

It would also be great if the DatasourceType property on the GatewayDatasource object was something other than 'Unknown'... like 'AzureTable' maybe???

 

FYI, the error content I get back from the Power BI service is:

 

{"error":{"code":"DM_GWPipeline_Gateway_DataSourceAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_DataSourceAccessError","parameters":{},"details":[]}}}

1 ACCEPTED SOLUTION
madia
Microsoft Employee
Microsoft Employee

you should use the following format:

 

{

  "credentials":"{\"credentialData\":[{\"name\":\"key\",\"value\":\"hi...rg==\"}]}",

  "credentialType": "Key",

  "encryptedConnection": "Encrypted | NotEncrypted", // chose one

  "privacyLevel": "None | Private | Organizational | Public", // chose one

  "encryptionAlgorithm":"None"

}

 

Thank you for pointing the datasource type issue, will fix it.

View solution in original post

4 REPLIES 4
madia
Microsoft Employee
Microsoft Employee

you should use the following format:

 

{

  "credentials":"{\"credentialData\":[{\"name\":\"key\",\"value\":\"hi...rg==\"}]}",

  "credentialType": "Key",

  "encryptedConnection": "Encrypted | NotEncrypted", // chose one

  "privacyLevel": "None | Private | Organizational | Public", // chose one

  "encryptionAlgorithm":"None"

}

 

Thank you for pointing the datasource type issue, will fix it.

Hi, 

 

This works - thanks for that.

 

A few questions/observations/suggestions:

 

* Is this documented anywhere? e.g. what should the format for 'credentials' be for other types of datasources? I feel that we shouldn't have to come to this forum for this sort of information.

* Rather than crafting a JSON string, it would be good if the PowerBI Client SDK supported a strongly-typed class for each datasource type.

* EncryptedConnection/PrivacyLevel/EncryptedAlgorithm: is there any documentation around these at all? When should they be used? What types of datasource do they apply to?

* Datasource Name: The datasource object that is returned by various APIs has a 'DatasourceName' property - this is invariably blank. It would be handy to have this populated in the event that a report had multiple datasources of the same type - it is possible to distinguish between them via the ConnectionDetails property, however that is a bit tricky. I'm assuming that this relies on Power BI Desktop supporting datasource names that it currently doesn't.

jimmcslim
Helper III
Helper III

No love for Table Storage?

I'm going to assume that it is not possible to set Azure Table Storage access credentials via the Power BI API then?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.