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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
walid140891
Helper III
Helper III

Failed to set credentials to power bi dataset online using azure storage account SAS.

Hello Power BI Pros,

It's a story full of details, we have a power bi file which is connected to an azure blob storage and retrieves the containers inside it by customer id:

 

walid140891_2-1671134360538.png


the pbix file later will be given to our customers and in order to force them to only access their data and prevent them from accessing all customers data and we have added a SAS (Shared access signature) and we disabled the public access to the Azure storage account.

That works fine until we publish the file, of course we need to set the dataset credentials, and since we also created a SAS for the storage account itself (to avoid giving the customers the access key) we chose to connect using the SAS token, but it always refused it even when public access is enabled with the correct privacy level, and we can only connect using the Access Key:

 

walid140891_1-1671134221051.png

 

Your help is much appreciatable.

 

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @walid140891 

According to the screenshot you provided with detailed error information, I found this error record for this error operation in the Microsoft background database:

Microsoft.PowerBI.ServiceContracts.PowerBIRemoteServiceException: PowerBI service client received error HTTP response. HttpStatus: 400. PowerBIErrorCode: DM_GWPipeline_Gateway_InvalidConnectionCredentials

 

I think this is a simple gateway to access this Azure storage account cloud data source when there is an incorrect credential error, if you can first reveal why you have to use the gateway to configure the data source credential connection for this Azure storage account cloud data source? If it is convenient, you can try to click "Edit credential" directly in "Data Source credentials" to enter the corresponding credentials for the Azure storage account cloud data source, let the data source definition take effect, and check again whether the refresh was successful?

For the type of credential entered, I think both the SAS token and the key can be tried:

Manage account access keys - Azure Storage | Microsoft Learn

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

View solution in original post

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi , @walid140891 

According to the screenshot you provided with detailed error information, I found this error record for this error operation in the Microsoft background database:

Microsoft.PowerBI.ServiceContracts.PowerBIRemoteServiceException: PowerBI service client received error HTTP response. HttpStatus: 400. PowerBIErrorCode: DM_GWPipeline_Gateway_InvalidConnectionCredentials

 

I think this is a simple gateway to access this Azure storage account cloud data source when there is an incorrect credential error, if you can first reveal why you have to use the gateway to configure the data source credential connection for this Azure storage account cloud data source? If it is convenient, you can try to click "Edit credential" directly in "Data Source credentials" to enter the corresponding credentials for the Azure storage account cloud data source, let the data source definition take effect, and check again whether the refresh was successful?

For the type of credential entered, I think both the SAS token and the key can be tried:

Manage account access keys - Azure Storage | Microsoft Learn

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

GilbertQ
Super User
Super User

Hi @walid140891 

 

What happens if you change the privacy level to Organizational?

 

Also when I have configured this in the past I have left all the default options in Azure blob storage. Could there be some setting on the blob storage causing this to fail?


I would suggest trying with all the default settings in Azure Blob storage and then make one change and test until it fails so you know where the error is?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Users online (4,055)