Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Groups validation

(0) ShareShare
ReportReport
Posted on by 183
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:
  • da1vea Profile Picture
    183 on at
    Groups validation
     
    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)))
  • ialbasheir-kbr Profile Picture
    71 on at
    Groups validation
    try using the following:
    Set(VarG,Office365Groups.ListGroups({'$filter':"startswith(displayName,'"& TextInputCanvas1.Value &"')"}).value)
     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,026 Most Valuable Professional

Leaderboard