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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
matttheba
New Member

Unable to run power query on loading more than 100 object IDs

I know I can run this to get the first 100 rows of object IDs

 

e.g. 

 

let
Source = Json.Document(Web.Contents("https://graph.windows.net/myorganization/users?api-version=1.6")),

 

But I want more than 100. And this does not work for some reason. Any ideas?

 

matttheba_0-1694744855625.png

 

3 REPLIES 3
ImkeF
Community Champion
Community Champion

I would recommend discussing this with Bing.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

ImkeF
Community Champion
Community Champion

Hi @matttheba ,
Intellisense shows an error in row 6 because you are using a special sign there.
Escape it like so: Source[#"@odata.nextLink].

But please consider using a different tool for it (Power Automate or the new sp_invoke_external_endpoint stored procedure in Azure SQL Server), as using Graph API isn't recommended nor supported in Power Query:
Lack of Support for Microsoft Graph in Power Query - Power Query | Microsoft Learn

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

How do I do this?

Bing gave me this code but it errors as well

let
Source = ActiveDirectory.Domains("Domain Name"),
my.domain.com = Source{[Domain="Domain Name"]} [Object Categories],
person1 = my.domain.com{[Category="person"]},
Expanded top1 = Table.ExpandRecordColumn(person1, "top", {"memberOf"}, {"top.memberOf"}),
Expanded top.memberOf2 = Table.ExpandListColumn(Expanded top1, "top.memberOf"),
Expanded top.memberOf3 = Table.ExpandRecordColumn(Expanded top.memberOf2, "top.memberOf", {"displayName", "name"}, {"top.memberOf.displayName", "top.memberOf.name"}),
Filtered Rows = Table.SelectRows(Expanded top.memberOf3, each ([displayName] <> null)),
Removed Columns = Table.RemoveColumns(Filtered Rows, {"person", "distinguishedName"}),
Renamed Columns = Table.RenameColumns(Removed Columns, {{"displayName", "Display Name"}, {"top.memberOf.displayName", "Group Email Address"}, {"top.memberOf.name", "Group Name"}}),
Merged Queries = Table.NestedJoin(Renamed Columns, {"Display Name"}, "AD - User Details", {"Display Name"},"NewColumn",JoinKind.LeftOuter),
Expanded NewColumn = Table.ExpandTableColumn(Merged Queries, "NewColumn", {"User Principal name", "First Name Letter", "Surname Letter"}, {"User Principal name", "First Name Letter", "Surname Letter"})
in
Expanded NewColumn

 

matttheba_0-1694978137296.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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