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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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