Hi all,
I'm trying to create a collection of all users that are stored in the Azure AD.
Because the organisation have more than 999 users in Azure AD, I'm try to a filter on domainname. (With this result I expect 270 users)
But load this collection, It looks like that I'm hit some boundaries because I've 105 results in my collection, and it stops with accounts that are starts with the letter L. So it's look like I'm still having an issue with some limits.
This is my filter to get my collection:
ClearCollect(Col_Users,Filter('Office365Users'.SearchUserV2().value , var_Usermaildomain in UserPrincipalName))
Does anyone know what I can to do to get all the expected results?
Kind regards,
Solved! Go to Solution.
yes, you must have a search term, with no search term, it is getting the first thousand results, then inside of those it looks for @hatever you are filtering by, so before you even start filtering, you already only have the first thousand results, which is why it stops at L
@iAm_ManCat |
My blog |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Yes, the default top count for SearchUsers is 1000, so you'll need to make that larger, also you have no searchterm in searchUser, so its returning all users, but again hitting that limit:
ClearCollect(Col_Users,Filter('Office365Users'.SearchUserV2({searchTerm:var_Usermaildomain ,top:2000}).value , var_Usermaildomain in UserPrincipalName))
https://docs.microsoft.com/en-us/connectors/office365users/#search-for-users-(v2)
@iAm_ManCat |
My blog |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi @iAm_ManCat ,
Thank you for your reply.
I just try your formula but that give me only 0 results back. Where I expect more.
For your information I'm also try to extract the variable to show you the input I've in my variable:
ClearCollect(Col_Users,Filter('Office365Users'.SearchUserV2({searchTerm:"contoso.com",top:2000}).value , "contoso.com" in UserPrincipalName))
When I change the formula to this value I get 117 results, but it's still stops by the users where the name starts with the letter L:
ClearCollect(Col_Users,Filter('Office365Users'.SearchUserV2({searchTerm:"" ,top:2000}).value , "@contoso.com" in Mail))
Do you've any idea how to achieve all the results in this case?
yes, you must have a search term, with no search term, it is getting the first thousand results, then inside of those it looks for @hatever you are filtering by, so before you even start filtering, you already only have the first thousand results, which is why it stops at L
@iAm_ManCat |
My blog |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi @iAm_ManCat ,
Thanks I fix it in my combobox to search for the right user. Now I got all the results I need.
Filter('Office365Users'.SearchUserV2({searchTerm:combobox1.SearchText ,top:2000}).value , "@contoso.com" in Mail)
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |