0

I have a list of users and for each I want to generate a list of all SharePoint groups that user is in, across the whole tenant.

What is the best way to do this?

So far I can list every site in the tenant and then check for group membership in each site but this seems very inefficient.

user2250152
  • 14,658
  • 4
  • 33
  • 57
Jan Martin
  • 408
  • 3
  • 11
  • Could you please add more details about the endpoints you are already using? Example: you check for a group membership - how? What do you mean by inefficient? Is it slow? – user2250152 May 12 '23 at 05:56
  • @user2250152 I am using this endpoint /_api/web/getuserbyid(' + userid + ')/?$expand=groups - my main problem is that 1000 users over 100 site collections means 100,000 calls – Jan Martin May 14 '23 at 23:02

0 Answers0