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 Platform Community / Forums / Power Apps / Check for existing Tea...
Power Apps
Answered

Check for existing Teams name, Microsoft Graph?

(0) ShareShare
ReportReport
Posted on by 151

At our school we have a form in Power Apps where teachers order Teams for there classes. Before the order is sent we'd like to check if the Teams name already exists.

Could this be done with Microsoft Graph?

If so, how?

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @OlaH :

    You could try:

    Get https://graph.microsoft.com/v1.0/groups?$filter=displayName eq 'YourGroupName'

    If the value of Value in the return value is empty, then the group named "YourGroupName" does not exist

    1.PNG

    Best Regards,

    Bof

  • OlaH Profile Picture
    151 on at

    Thank you @bo for your suggestion but I can see that I wasn't clear in my question.

    I want to see in the app, before the order is send, it the Teams exist.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @OlaH :

    You can use this API to get the return value first to determine whether there is a corresponding group.

    Get https://graph.microsoft.com/v1.0/groups?$filter=displayName eq 'YourGroupName'

     If the value of Value is empty, execute the command to create the group.

    Best Regards,

    Bof

  • OlaH Profile Picture
    151 on at

    Ok, but forget me. I've not worked with this kind of API before.

     

    Could you please explain how I would use this to show a warning icon (Visible) if the team exists? 

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @OlaH :

    First create a custom connector:

    2.PNG

    I think this link will help you a lot:
    https://www.youtube.com/watch?v=ORHghzhvmyA

    Secondly,Create a button and set it's Onselect property to:

    If(
     !IsBlank(MSGraphAppConnector.GetGroups({'$filter': "displayName eq 'TheGroupName'"}).value),
     Notify("The group already exists"),
     CreateYourGroup /*Create Group, use your own formula*/
    )

    555.gif

    /*'A Talk' is a group that already exists*/

    Best Regards,

    Bof

  • OlaH Profile Picture
    151 on at

    This forum is absolutely wonderful, thanks @v-bofeng-msft.
    Thank you for spreading your knowledge and helping us who are in need of it.

     

    Now I get in to it right away.

     

    /Ola

  • NM-06090901-0 Profile Picture
    170 on at

    Hi,Although i know this is an old topic i am currently having the exact same issue.Can you show me visuallyhow you do the comparison after the value is empty?

    Thanks

  • OlaH Profile Picture
    151 on at

    Hi Mikellas

    Accually I don't user this solution, I just tested it.

     

    Ola  

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard