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

Announcements

News and Announcements icon
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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard