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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
kurteichler
New Member

Using Graph API as a data source in Power BI

When I run https://graph.microsoft.com/beta/groups?$filter=displayname+eq+'M365GroupName'&$expand=members in https://developer.microsoft.com/en-us/graph/graph-explorer I get all members of the group.  I can run the same graph.microsoft request in Power Automate and get all members.

 

However, if I run the same graph.microsoft request as a Web data source in Power BI, I am able to make a connection but only 1 row of data is returned.  If I click on 'List' under value.members, there are 42 rows.  I'm expecting more than 100, but at least I can see there are several.  

 

kurteichler_2-1707154148348.png

 

Expanding any of these records show Null for all data, so I'm not sure I'm getting all of the members.

kurteichler_3-1707154371323.png

 

I followed this article, but only get errors when I create a custom column and add the formula.  Column1 has been replaced with value.members and just members.

https://powerusers.microsoft.com/t5/Power-Query/User-Values-from-SharePoint-showing-up-as-List/td-p/...

 

The issue I'm having is being able to see the full list of members in the group.  Since Azure AD isn't a data source in Power BI, I want to use the graph API to retrieve all name along with the attributes the graph API returns then display in a simple chart.

2 REPLIES 2
kurteichler
New Member

In the Graph, I get @odata.context.  I also get this in my PBI data source query.  I don't see anywhere that mentions odata.nextLink.

 

kurteichler_0-1707688968737.png

 

v-junyant-msft
Community Support
Community Support

Hi @kurteichler ,

The Microsoft Graph API uses paging to handle large datasets by returning a limited number of items in each response. You may notice an @odata.nextLink property in the response, which contains the URL to the next page of results. In Power BI, when connecting to a web source that uses paging, you need to account for this by retrieving subsequent pages as needed.
Expanding Members: When you click on 'List' under value.members and see 'Null' values, it might be due to nested non-scalar values.
Make sure that you are using the correct column name in the formula provided in the article. The column name should match exactly with the one present in your dataset.
Ensure that the app registration used for the Graph API has the correct permissions to access all members of the group. This might involve setting up proper scopes and consent for the app registration in Azure portal. If you have not already, check your data source privacy settings in Power BI. Data combination behaviors can be affected by these settings, potentially causing issues with data loading.

Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors