migueesc123 / PowerBIRESTAPI

A Microsoft Power BI Data Connector or Power Query Connector for the Power BI REST API
MIT License
238 stars 74 forks source link

PBI refresh failure constantly with credential error #178

Closed ChandraPT closed 1 year ago

ChandraPT commented 1 year ago

Hi Gurus, I keep getting below error message for the PBI refresh even though password is non-expiry and sometimes, it runs without issues. I opened a Microsoft Ticket and they couldn't figure out since this is a 3rd party API and asked me to reach out original developer.

Please help if you encountered of this issue.

{"error":{"code":"DM_GWPipeline_Gateway_InvalidConnectionCredentials","pbi.error":{"code":"DM_GWPipeline_Gateway_InvalidConnectionCredentials","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"The credentials provided for the PowerBIRESTAPI source are invalid. (Source at PowerBIRESTAPI.)"}},{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2147467259"}},{"code":"Microsoft.Data.Mashup.CredentialError.DataSourceKind","detail":{"type":1,"value":"PowerBIRESTAPI"}},{"code":"Microsoft.Data.Mashup.CredentialError.DataSourceOriginKind","detail":{"type":1,"value":"PowerBIRESTAPI"}},{"code":"Microsoft.Data.Mashup.CredentialError.DataSourceOriginPath","detail":{"type":1,"value":"PowerBIRESTAPI"}},{"code":"Microsoft.Data.Mashup.CredentialError.DataSourcePath","detail":{"type":1,"value":"PowerBIRESTAPI"}},{"code":"Microsoft.Data.Mashup.CredentialError.Reason","detail":{"type":1,"value":"AccessForbidden"}},{"code":"Microsoft.Data.Mashup.MashupSecurityException.DataSources","detail":{"type":1,"value":"[{\"kind\":\"PowerBIRESTAPI\",\"path\":\"PowerBIRESTAPI\"}]"}},{"code":"Microsoft.Data.Mashup.MashupSecurityException.Reason","detail":{"type":1,"value":"AccessForbidden"}}],"exceptionCulprit":1}}} Table: Dataset Refresh History.

migueesc123 commented 1 year ago

for how long does your refresh run before you hit this error?

ChandraPT commented 1 year ago

After 6 mins or so.

migueesc123 commented 1 year ago

it could be something related to your credentials being rejected or not valid. It's not directly related to the connector, but rather specific to your situation and how you have things setup internally, but the issue seems to be related to the credentials not being correct. You'll need to use something like Fiddler to see what's the raw response from the REST API at your machine running the gateway to see what you're getting and try to troubleshoot from there.

ChandraPT commented 1 year ago

Hi, if the credentials are being rejected or not valid, it should fail all the refreshes but only sometimes in a day. I checked with Microsoft Tech Support by providing all necessary log files, fiddler etc to debug if the credentials are not getting validated but it is not the scenario. I will take your suggestion and work once again to troubleshoot the issue. But this is ongoing issue from many months. Thanks once again.

migueesc123 commented 1 year ago

Unfortunately, we don't really own the data source so what you're describing in terms of an inconsistent behavior would happen on the data source side and not really on the connector side.

However, if you do encounter a bug at the connector level, we'll be happy to take a look at it.

I'm moving this to be a discussion as it doesn't seem to be a bug.