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
lapora1976
Regular Visitor

PowerBI Service / API - OAuth2 Credentials to Azure SQL failed

I was originally able to update datasource credentials for imported pbix reports using the API and also using the GUI on the PowerBI Service (@ Settings -> Datasets -> Select Dataset -> Data source credentials -> Edit Credentials - > Select OAuth2).

 

I am able to update the credentials successfuly, using either the API or web, but after reloading the settings for the dataset the service tells me the credentials are invalid. We are NOT using any type of on-premises gateway.

 

The error returned:

{"error":{"code":"DM_GWPipeline_Gateway_DataSourceAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_DataSourceAccessError","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2146232060"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"Login failed for user ''."}},{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2146232060"}},{"code":"DM_ErrorDetailNameCode_UnderlyingNativeErrorCode","detail":{"type":1,"value":"18456"}}]}}}

 

This error is returned whether I use the API or use the Edit Credentials on the service, select OAuth2 and enter valid credentials. ( I used fiddler to see the error being returned when within the PowerBI service)

 

I have tried 3 different users, all AAD (synced with our local domain). The users are part of a group that is allowed access to the Azure SQL server and database being used. The group has a user on the database being accessed as well as the master database on the Azure SQL server.

 

I have also tried adding a user and login directly for the users instead of using group membership but this has the same effect.

 

I can login to the server and connect to the database using ssms with all accounts.

 

It is saying Login failed for user "." which I assume to mean either the permissions are incorrect on the Azure SQL server or it is not passing the user correctly?

 

Has anyone else seen this issue? What other permissions could I check/add/remove to attempt to fix this?

As I said before, this WAS working a few weeks ago but now is not functioning.

1 REPLY 1
v-micsh-msft
Microsoft Employee
Microsoft Employee

Two things:

1. Make sure the Windows Azure Services is enabled under Azure Portal,

2. Check the Azure Firewall rules to make sure the IP is allowed,

The error message "Login failed for user", mostly should be caused by the Azure firewall blocking.

 

Regards,

Michael

 

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.