cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

Re: get group members returns maximum 100 users

@katonageNo, right on the front of an action there's an option to show advanced options. 

Get Group Members.PNG

 

 

 

View solution in original post

Highlighted
Advocate V
Advocate V

Re: get group members returns maximum 100 users

That worket, Thanks! I tried to use o365Group connector.

for me Top=999 will be enough for a while...

Highlighted
Frequent Visitor

Re: get group members returns maximum 100 users

Once again - that solution is useless for most of people who do not have administrative privilleges to use AzureAD connector.

 

I'm looking from someone who will do the same with "List group members" O365 connector, which doesn't have corresponding "advanced" menu. Maybe it would be possible to do within code directly ?

Highlighted
Advocate III
Advocate III

Re: get group members returns maximum 100 users

@wastekI am sorry that solution doesn't work for you.

 

I do not think there is any solution to this without using the AD connector or having other more senior staff in IT facilaite a solution for Flow. 

Highlighted
Frequent Visitor

Re: get group members returns maximum 100 users

OK, but then this thread is not resolved, since it is about "get group members" connector, not Azure AD. Can this be reported as a bug for fixing it ? Or at least getting this connector parametrized so I can enter how many users are collected ? 

 

In general - getting the Sharepoint Group members / Yammer / Teams in an automated way is hardly possible right now in the entire O365 space. I need to manually collect 14 pages of json files from Yammer to fetch them somehow. Entire glamorous FLOW is useless.

Highlighted
Advocate I
Advocate I

Re: get group members returns maximum 100 users

gotit

Highlighted
New Member

Re: get group members returns maximum 100 users

I am encountering a similar issue getting a Group List.  Reviewing the JSON payload, it looks like it returns a NextLink value:
@odata.nextLink

If you loop through these, you can get all.

 

So:

  1. use base URL to get initial JSON
    1. Add value to return list
    2. While @odata.nextLink is not null
      1. Use @odata.nextlink for repeat call
      2. Add value to return list
  2. return return list

This worked for me.

Highlighted
Frequent Visitor

Re: get group members returns maximum 100 users

Hi @MHagesfeld 

 

Where do you script that ? Flow/PowerShell/Python ? 

 

Since I didn't found a solution on this forum I finally managed to get that users list through dedicated PowerShell sciript.  It loops through all pages of Yammer API output through the route and dumps the result to some xml structure. I was not able to convert it to csv within te same script, so I'm importing it to the Excel using xml as a datasource

 

https://www.yammer.com/api/v1/users/in_group/$GroupId.xml

 

$GroupId=XXXXX
$Token = "YOUR API TOKEN"

$Headers = @{ "Authorization" = "Bearer "+$Token }

$YammerGroups = null
$YammerGroups.Clear();
$GroupCycle = 1
$GroupCount = 0
$export = "<response><users>"

Clear-Host

DO
	{
		$GetMoreGroupsUri = "https://www.yammer.com/api/v1/users/in_group/$GroupId.xml?page=$GroupCycle"
		write-host ("REST API CALL : $GetMoreGroupsUri")
                [xml]$Xml = ((Invoke-WebRequest -Uri $GetMoreGroupsUri -Method Get -Headers $Headers).Content)
                $YammerGroups += $Xml.response.users.user
                $GroupCycle ++
                $GroupCount += $Xml.response.users.user.count
		write-host ("GROUPMEMBER COUNT : $GroupCount")

               $export = $export + $Xml.response.users.InnerXml
               #write-host($export)
    }	
While ($Xml.response.users.user.count -gt 0)

# extracting xml
$export = $export + "</users></response>"
Out-File -FilePath "groupusers.xml" -InputObject $export -Encoding ASCII -Width 50

$YammerGroups.Clear();

 

----------------------------------------------------------------------------

Meanwhile I've noted that "List group members" connector in the FLOW was upgraded (no longer "preview") and it is possible to define the number of users to fetch. Thanks !

Highlighted
New Member

Re: get group members returns maximum 100 users

OK, looks like basically the same solution (the next link just gives the next page of data).  I'm not using MS Flow so probably a different API, I just stumbled on this when trying to find an answer on my MS Graph question 🙂

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (8,112)