Forum Discussion
Import Sharepoint Groups: UserId - GroupId
- 2 years ago
Hi everybody,
and thanks for the answer.
I want to share with you the solution that i find on a post.
- I create a function with a parameter that use the GET
let
Source = (Offset) =>
let
Source =
Xml.Tables(Web.Contents("https://MYWEB.sharepoint.com/sites/MYSITE/_api/web/SiteGroups/GetById(" & Number.ToText( Offset ) & ")/Users"
)
)
in
Source
in
Source
- then i call this function with insert a new column INVOKE CUSTOM FUNCTION and using a column of the same table (the id of the groups) as parameter of the function.
- then i arrange the data to obtain what i need: extract the users id from the results.
This post help me to resolve:
https://community.fabric.microsoft.com/t5/Community-Blog/Use-Column-as-Parameter-for-Custom-Function-in-Power-Query/ba-p/1495277
Thank you every body i put it as a solution.
See you next time!
Hi lucadelicio ,
Hope all is going well.
In order to solve your problem, here is the method I provide:
Use a PowerShell script to export user and group information to a CSV file, and then import the CSV file into Power BI. You need to connect to SharePoint Online before doing this. The following documents provide specific steps for your reference:
Manage SharePoint users and groups with PowerShell - Microsoft 365 Enterprise | Microsoft Learn
If you have any questions please feel free to contact me, I hope my answers can help you.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
- lucadelicio2 years ago
Impactful Individual
Goodmorning,
i'm trying to use the SP.GroupCollection.getById().
I create in Power Query a function with a parameter.
If i arrange the result is ok, but the problem is that i have to invoke the method from the function manually n times for all my group.
There is a method to call every group in one get or to invoke the get for a list (the item list of my groups)?
Thank you