cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dsab81
Microsoft
Microsoft

Graph API - Groups - Custom Connector - Search Group

Hi,

I have a custom connector named 'Graph Groups' pointing to graph api (https://graph.microsoft.com/v1.0/groups/) to list groups 

I have a combo box that's pointing to the above connector and the Items value is : GraphGroups.GetGroups().value

 

While the setup looks ok, when i search for a group that i wanted, it doesn't appear though it exists.

 

Seems the search is not able to pull the complete list of groups in my organization, due to which my group isn't listing . 

 

How do i make my search work and get the list of groups that matches my search text ?

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @dsab81 ,

 

First of all, the api can get all the groups. But its results will be paged.

 

For example:

If you have 1050 groups, then the result will be divided into 11 pages.

100 groups per page for the first 10 pages.

50 groups for the 11th page.

 

Secondly, if you use a custom connector, you could pass the top parameter to get more than 100 groups.

(If you don’t enter parameters, it returns 100 groups by default)

However, the document does not indicate the upper limit of the top parameter.

 

In addition, If the results of your groups are paged, each page has a @odata.nextLink value.

v-xiaochen-msft_0-1620700052384.png

Its role is to get the next 100 gropus.

However, in my test, the custom connector cannot recognize the skiptoken parameter.

So, I used the top parameter in the custom connector instead of @odata.nextLink.

 

But flow can recognize this parameter. 

For example, if you have 1050 groups, you could use flow to loop 11 times.

Solution using flow Here

 

Finally , you could choose to use a custom connector or flow according to the actual situation.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

5 REPLIES 5
v-xiaochen-msft
Community Support
Community Support

Hi @dsab81 ,

 

How many groups do you have?

It returns 100 groups by default.

If you want it to return more groups, please use top in the api.

 

v-xiaochen-msft_0-1620626210308.png

v-xiaochen-msft_1-1620626247131.png

 

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

dsab81
Microsoft
Microsoft

Hi @v-xiaochen-msft Thanks. but it did not help. My group doesn't show up in the list the first 100 when i search the combo box.

 

any other way? 

v-xiaochen-msft
Community Support
Community Support

Hi @dsab81 ,

 

You did not answer my question.

If your number of groups is greater than 100, my method should work.

Just add the 'top' parameter to your api and enter the number of your groups when calling the api.

In addition, you could also call the Api by using flow, and their results should be the same. Here

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

 

 

dsab81
Microsoft
Microsoft

@v-xiaochen-msft Yes there will be 1000's of Microsoft internal groups. Its hard to get a number or keep a number as it keeps growing.

How much is the max number allowed  ?

 

May i know how does the Office365 connector works so flawlessly and is able to search from 1000s of users ? 

 

v-xiaochen-msft
Community Support
Community Support

Hi @dsab81 ,

 

First of all, the api can get all the groups. But its results will be paged.

 

For example:

If you have 1050 groups, then the result will be divided into 11 pages.

100 groups per page for the first 10 pages.

50 groups for the 11th page.

 

Secondly, if you use a custom connector, you could pass the top parameter to get more than 100 groups.

(If you don’t enter parameters, it returns 100 groups by default)

However, the document does not indicate the upper limit of the top parameter.

 

In addition, If the results of your groups are paged, each page has a @odata.nextLink value.

v-xiaochen-msft_0-1620700052384.png

Its role is to get the next 100 gropus.

However, in my test, the custom connector cannot recognize the skiptoken parameter.

So, I used the top parameter in the custom connector instead of @odata.nextLink.

 

But flow can recognize this parameter. 

For example, if you have 1050 groups, you could use flow to loop 11 times.

Solution using flow Here

 

Finally , you could choose to use a custom connector or flow according to the actual situation.

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (39,539)