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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
HippoKant
Regular Visitor

Excel on Sharepoint Online into Power BI via Microsoft Graph API

Hi,

 

I have a requirement that I need to populate Power BI with data from Excel on Sharepoint online (either Site or Teams), however, I cannot use the Sharepoint connector or any other solution. It must be via Graph API. 

 

When using the graph api developer - I do get the desired data using the following endpoint:

https://graph.microsoft.com/v1.0/groups/{ID}/drive/root:/general/rapport1.xlsx:/workbook/worksheets('Sheet1')/usedRange

 

However, when I use the same in PowerBI I get error: DataFormat.Error: We were unable to resolve the type name 'workbookRange' to an EdmType

 

Googling this error and applying the suggested solutions doesn't help. I suspect the connecter is incorrect.

 

This is the query:

token_uri = "https://login.windows.net/" & #"Azure AD Tenant ID" & "/oauth2/token",
resource="https://graph.microsoft.com",
tokenResponse = Json.Document(Web.Contents(token_uri,
[
Content = Text.ToBinary(Uri.BuildQueryString(
[
client_id = #"Application SPO",
resource = resource,
grant_type = "client_credentials",
client_secret = #"Application SPO Secret"
]
)),
Headers = [Accept = "application/json"], ManualStatusHandling = {400}
])),
access_token = tokenResponse[access_token],

Source = OData.Feed("https://graph.microsoft.com/v1.0/groups/XXXX/drive/root:/general/rapport.xlsx:/workbook/worksheets('...", [ Authorization = "Bearer " & access_token ], [ ExcludedFromCacheKey = {"Authorization"}, ODataVersion = 4, Implementation = "2.0" ])
in
Source

 

Any help would be highly appreciated

 

 

1 REPLY 1
LastOfMyKind
Regular Visitor

Same here, bumping against the wall.

I think the cause is in the format of the api query response, it's not purely row/column-based, like, for example, managedDevices, where pbi can easily transform it from json to M query table. It needs some transposition or something on the M query level so that it fits pbi table design but my knowledge ended here 😞

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors