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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
Anonymous
Not applicable

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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

Anonymous
Not applicable

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.