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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
JohnAPD
Frequent Visitor

Service Principal Unable to refresh Sharepoint Cloud Connection

We have setup a service principal to enable the removal of personal user credentials from datasets due to Mandatory MFA being put in place. Still, we get an error for the SharePoint data source "The credentials provided for the SharePoint source are invalid. (Source at https://xxxxx.sharepoint.com/sites/xxxxxx.). The exception was raised by the IDbCommand interface."

We have two data sources SQL and Sharepoint

we have created cloud connection data gateways for these so we can select the required connections when publishing the dataset

Using the service principal auth method.

JohnAPD_2-1719232117599.png

The connections are tested ok at this stage

 

The workspace has the service principal assigned to it with Admin rights

JohnAPD_1-1719231883107.png

 

We take over the dataset as the service principal with REST API, and the SQL connection works ok but not Sharepoint (we tested these separately, we were told this was a prerequisite to allow the refresh to happen via the SP

We have gone around a few circles with MS support and this was their latest advice:

JohnAPD_0-1719231782697.png

We created the service principal profile but this had no effect

 

Any advice anyone can give would be appreciated

6 REPLIES 6
JohnAPD
Frequent Visitor

Hi @aj1973 appreciate the help but sorry to say that Copilot shouldn't be trusted for this kind of information as no option to sign in exists as described and further research elsewhere proves its not possible:

JohnAPD_0-1719305077673.png

 

aj1973
Community Champion
Community Champion

In your situation it might be better to create a Service account and use it to authenticate against SQL Server and SharePoint. 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

JohnAPD
Frequent Visitor

Additional info:

 

Service principal API permissions are configured as:

JohnAPD_0-1719232623340.png

JohnAPD_0-1719232913482.png

 

The SP is part of a group within Sharepoint aswell

aj1973
Community Champion
Community Champion

Hi @JohnAPD 

Do the SP have a Power BI Pro license assigned to it?

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hi @aj1973 I don't think its possible to assign a license to the Service Principal (app registration) as you cannot "login" with it and as per this:

JohnAPD_0-1719236988852.png

https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-sample-for-customers?tabs=net-co...

aj1973
Community Champion
Community Champion

Hi @JohnAPD 

Thanks to Copilot

aj1973_0-1719242586763.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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