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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
amol8286
Regular Visitor

Unable to Update Datasource cerdentials using OAuth2 authentication

Hi

 

I'm trying to update datasource for my Power BI Reports using the " Gateways-Update Datasource" API. The Datasource is on cloud. I tried to use the below link to test it https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/updatedatasource#oauth2_credentials_exam...

 

Below are other details:

Datasource: Cloud

OAuth2 Authentication

Gateway ID and Datasource ID entered which are mandatory

Body: as given in the example from the above link. In the Ket part I have entered the Baerer Key. Also tried with Refresh Key but same error.

 

Below is the Response:

{
"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 Dynamics365BusinessCentral source are invalid. (Source at Dynamics365BusinessCentral.)"
}
},
{
"code": "DM_ErrorDetailNameCode_UnderlyingHResult",
"detail": {
"type": 1,
"value": "-2147467259"
}
},
{
"code": "Microsoft.Data.Mashup.CredentialError.DataSourceKind",
"detail": {
"type": 1,
"value": "Dynamics365BusinessCentral"
}
},
{
"code": "Microsoft.Data.Mashup.CredentialError.DataSourceOriginKind",
"detail": {
"type": 1,
"value": "Dynamics365BusinessCentral"
}
},
{
"code": "Microsoft.Data.Mashup.CredentialError.DataSourceOriginPath",
"detail": {
"type": 1,
"value": "Dynamics365BusinessCentral"
}
},
{
"code": "Microsoft.Data.Mashup.CredentialError.DataSourcePath",
"detail": {
"type": 1,
"value": "Dynamics365BusinessCentral"
}
},
{
"code": "Microsoft.Data.Mashup.CredentialError.Reason",
"detail": {
"type": 1,
"value": "AccessUnauthorized"
}
},
{
"code": "Microsoft.Data.Mashup.MashupSecurityException.DataSources",
"detail": {
"type": 1,
"value": "[{\"kind\":\"Dynamics365BusinessCentral\",\"path\":\"Dynamics365BusinessCentral\"}]"
}
},
{
"code": "Microsoft.Data.Mashup.MashupSecurityException.Reason",
"detail": {
"type": 1,
"value": "AccessUnauthorized"
}
}
],
"exceptionCulprit": 1
}
}
}

 

Kindly let me know if I have missed something....

4 REPLIES 4
giost
Regular Visitor
giost
Regular Visitor

Same problem here:

Re: AccessUnauthorized on Mashup engine using Gateways - Update Datasource API

 

A valid response from a MS expert would be highly appreciated. 

rahulverma
Frequent Visitor

Hi @v-qiuyu-msft Can you please check it out as we are getting the same problem while updating the credentials using the rest api and data source is Dynamics business central.

amol8286
Regular Visitor

Any inputs my above query...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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