So, we are looking into some powerapps solution for the workplace but struggling with some search user query. The need is to be able to search Office365Users who belongs to some Azure AD Security groups (Office365Groups). But from what I understand the SearchTerms cant use anything like {groups : 'SecutiryUserGroupID'} and it only can search based on parts of name and username/email .. Essentially I have also tried generating a separate user list (email list) and used that in the search but that is darn slow. Any idea how can this be achieved ?? Thanks In advance
Solved! Go to Solution.
Hi @sanju_bd :
I am afraid that the function you mentioned is currently not available. If you need this function, I suggest you post your ideal to this forum:
In addition,I suggest you try this formula as an alternative:
Ungroup(
ForAll(
Office365Groups.ListGroupMembers('GroupID').value As UserList,
{Users: Office365Users.SearchUserV2({searchTerm: UserList[@mail]}).value}
),
"Users"
)
Best Regards,
Bof
Hi @sanju_bd :
Could you tell me:
Do you want to search for users in a certain group?
If so,I suggest you use this formula to get all the members in the specified group, and then get the users you are looking for based on the returned result of this formula.
Office365Groups.ListGroupMembers('TheGroupID').value
Best Regards,
Bof
@v-bofeng-msft Thanks for getting back. This is exactly what I had been doing. Generating a separate list based on the groups which seems to have only Email and some other field and not the full office 365 profile that we need. Beside that generating a list (of emails for example) based on the groups takes a while (30 - 40 secs) which is simply not acceptable.
Ideally, I have had been looking for a solution where I can search office365.SearchUser with GroupId can be used as one of the searchTerm.
Hi @sanju_bd :
I am afraid that the function you mentioned is currently not available. If you need this function, I suggest you post your ideal to this forum:
In addition,I suggest you try this formula as an alternative:
Ungroup(
ForAll(
Office365Groups.ListGroupMembers('GroupID').value As UserList,
{Users: Office365Users.SearchUserV2({searchTerm: UserList[@mail]}).value}
),
"Users"
)
Best Regards,
Bof
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
197 | |
69 | |
47 | |
36 | |
25 |
User | Count |
---|---|
239 | |
109 | |
89 | |
88 | |
66 |