Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
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
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