web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Groups validation

(0) ShareShare
ReportReport
Posted on by 185
Hi all,
 
I am trying to find a way to validate a group name (if it exists or not).
 
I have tried using the new Text Input (groupName.Value) and old (TextInput1.Text). I have used the Graph API to get all groups and display them in a Gallery:
 
Set(varGroups,Office365Groups.HttpRequest("https://graph.microsoft.com/v1.0/groups","GET",""))
 
My Gallery is set to:
 
Table(varGroups.value)
 
So ideally I would like that when i type in a text box it validates if that group exists or not. I also would prefer not to have the gallery if possible. I also tried this:
 
Set(varSearchGroups,Office365Groups.HttpRequest("https://graph.microsoft.com/v1.0/groups?$filter=startswith(displayName, 'groupName.Value')&$count=true&$top=1&$orderby=displayName,"GET",""))
 
But it didnt work. Any ideas how I can achieve this?
 
Categories:
I have the same question (0)
  • ialbasheir-kbr Profile Picture
    87 on at
    try using the following:
    Set(VarG,Office365Groups.ListGroups({'$filter':"startswith(displayName,'"& TextInputCanvas1.Value &"')"}).value)
     
  • da1vea Profile Picture
    185 on at
     
    I like the filter option - will see if I can incorporate that.
     
    For now, I ended up using this:
     
    Set(varGroups,Office365Groups.HttpRequest("https://graph.microsoft.com/v1.0/groups","GET",""));
    !IsBlank(LookUp(Gallery1.AllItems, Lower(Text(ThisRecord.Value.displayName)) = Lower(TextCanvas1.Text), Text(ThisRecord.Value.displayName)))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard