Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I'm trying to move our data connections over to use service principals.
For sharepoint connections I can make it work by setting up a service principal along the lines of Setting up SharePoint app-only principal with App Registration
However that is being deprecated in Feb 2026.
It looks like I should be able to instead set the permissions using MsGraph along the lines of:
# Replace with your values
$application = @{
id = "17b4...." # Client ID of the Managed Identity
displayName = "Fabric Service Principal" # Display name (optional but recommended)
}
$appRole = "read" # Can be "read" or "write"
$spoTenant = "a****.sharepoint.com" # Sharepoint site host
$spoSite = "B****" # Sharepoint site name
# Site ID format for Graph API
$spoSiteId = $spoTenant + ":/sites/" + $spoSite + ":"
# Load Microsoft Graph module
Import-Module Microsoft.Graph.Sites
# Connect with appropriate permissions
Connect-MgGraph -Scope Sites.FullControl.All
# Grant site-level permission
New-MgSitePermission -SiteId $spoSiteId -Roles $appRole -GrantedToIdentities @{ Application = $application }
Going along that route, powershell tells me the service principal has permissions but when I try to connect using Power Bi Service it says credentials are invalid.
Any ideas on what I'm missing?
Solved! Go to Solution.
Hi @bcdobbs
Thank you for using Microsoft Community Forum.
Currently, due to some limitations, Power BI Service does not yet support authenticating to SharePoint Online using Microsoft Graph-based service principal tokens.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Hi @bcdobbs
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
Hi @bcdobbs
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @bcdobbs
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @bcdobbs
Thank you for using Microsoft Community Forum.
Currently, due to some limitations, Power BI Service does not yet support authenticating to SharePoint Online using Microsoft Graph-based service principal tokens.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Hi @bcdobbs You might be missing admin consent for Graph API permissions, enabling service principals in Power BI tenant settings, or proper SharePoint site permissions. Also, ensure connection settings in Power BI are correctly configured.
Admin consent is granted, service principals work in power bi (as said it works via sharepoint ACS permissions but they are being retired).
Can you expand on what you mean by proper sharepoint site permissions?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 56 | |
| 55 | |
| 32 | |
| 18 | |
| 14 |