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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
tzavertnik
New Member

Update Data source credentials via API for SharePoint Online

Has anyone had any success updating the Data source credentials via API when the Data Source is a SharePoint site? I have a Power BI Report (pbix) which is added to a workspace via the API but the refresh errors out because the credentials have to be re-added. I would like to update the OAuth credentials via the API. Is that possible? Thanks.

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

Hi @tzavertnik,

You can refer to the following link to use 'account/password' or 'client/secret id' to get an access token for rest API usages:

Solved: Pull data from a REST API Authentication - Microsoft Power BI Community
In addition, you can also try to create a custom data connector to package the rest API and corresponding verify steps in it:

Chris Webb's BI Blog: Connecting To REST APIs With OAuth2 Authentication In Power Query/Power BI Chr...

Start developing custom connectors for Power Query - Power Query | Microsoft Docs
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @tzavertnik,

You can refer to the following link to use 'account/password' or 'client/secret id' to get an access token for rest API usages:

Solved: Pull data from a REST API Authentication - Microsoft Power BI Community
In addition, you can also try to create a custom data connector to package the rest API and corresponding verify steps in it:

Chris Webb's BI Blog: Connecting To REST APIs With OAuth2 Authentication In Power Query/Power BI Chr...

Start developing custom connectors for Power Query - Power Query | Microsoft Docs
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

I'm sorry, but how does this solve his/her problem?!

We also have the need to set the credentials for Sharepoint Online via the API, and until now had no luck. Can anyone else help?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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