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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.