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 if Email exist i...
Power Apps
Answered

Check if Email exist in O365 in PowerApps

(0) ShareShare
ReportReport
Posted on by 96

Hello PowerUsers,

 

I am new to PowerApps and I am building an app where user will enter the email address in text input field inside the Edit Form. I need to validate the entered email with Office 365 Users to check whether email exists or not. After checking whether email is correct OR it exists w.r.t Office 365 Users , there should be a message OR Icon which will show if the entered email is valid/invalid.

 

Can you please help me with it . This is my first time doing it and I could not find an appropriate answer for this.

 

 

UPDATE:  Though i have kept one message as solution but the entire conversation was what helped me to get the correct answer.

 

 



Categories:
I have the same question (0)
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @Prateek9 ,

     

    With the "Office 365 Users" connector, you can search for a user with an name or an email.

     

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/connections/connection-office365-users

     

     

    IsEmpty(
     'Utilisateursd’Office365'.SearchUserV2({
     searchTerm:TextInput.Text
     }).value
    )

     

     

    "IsEmpty()" will return true if there are matching results.

  • Prateek9 Profile Picture
    96 on at

    Hello @WiZey ,

     

    I am not searching for a user email , what I want is that i have entered an email id in "Text Input" and i want that email id to be validated whether it is correct or not using "Office365 User". 

    Prateek9_0-1679999712546.png

    Maybe i got it wrong . Can you please tell me where i should enter the code to achieve this.

     

    Also , is there any icon I can use which will indicate that email is correct or not and what code to enter in it ?

  • Verified answer
    WiZey Profile Picture
    3,023 Moderator on at

    The formula I gave you let you check if the name or email inputted exists in your office 365 base, but maybe a better method would be to use a combobox instead of a textinput to look for an existing email instead of checking their validity?

     

    Combobox.Items: Office365Users.SearchUserV2({searchTerm:Self.SearchText}).value

     

    With a combobox, you can enter any name and it will automatically look for every matching results which you can then select from the control. 

     

    As for the icon, as it is purely visual, I guess any icon from Power Apps can do? However, if you want to check if the user selected an email from the combobox, you can use this:

     

    IsBlank(ComboBox.Selected) //Single selection
    or
    IsEmpty(ComboBox.SelectedItems) //Multiple selections

     

  • Prateek9 Profile Picture
    96 on at

    Hello @WiZey ,

     

    thanks for your suggestion , I inserted the Combobox inside the Data Card where earlier there was Text Input and I am able to search for email address directly . But now i am facing another problem. 

     

    After inserting the Combobox in DataCard , when i am changing the "Update()"property to - Combobox.Selected , it is giving me the error "Expected Text Values".Prateek9_0-1680074960311.png

    Prateek9_2-1680075030077.png

    Background

    In my app , I have mutiple screens and this is one if them. At the end , i am submitting the data which gets saved in Sharepoint List and I want the full email address to be saved in SP list.

    Prateek9_3-1680075628403.png

     

     



     

  • WiZey Profile Picture
    3,023 Moderator on at

    That's because the combobox's items are users, which by definition are records with multiple columns.

     

    By referencing "Combobox.Selected", it returns the whole record instead of just a single column.

     

    Try with "Combobox.Selected.Email" if you want to get the selected's email.

  • Prateek9 Profile Picture
    96 on at

    thanks @WiZey  

    Email is getting saved in SP List now . 😊
    I know this is not the topic for which i have raised the issue but would be grateful if you can help me with it . When I am displaying the data in Gallery , i am able to do it but when i use the "View / Edit " functionality through icons , email field is coming as blank there 

    Gallery data (Email address is getting displayed):

    Prateek9_0-1680085109076.png

     

    When clicking on View /Edit Button , Email field coming as blank :
    View :

    Prateek9_1-1680085183563.png

     

    Edit:

    Prateek9_2-1680085231466.png

     

    Below is the code that i am using when I click on View /Edit icon :

    View:

    Prateek9_3-1680085286413.png

     

    Edit:

    Prateek9_4-1680085301369.png

     

    Can you please check and help me with this.

  • WiZey Profile Picture
    3,023 Moderator on at

    Check the "Default" property of your combobox. It must be blank or something.

     

    Every control in your form has a "Default" property filled with the value of the item of the form. It must be something like "Parent" or "ThisItem", you'll have to check it.

     

    As the "Items" property use "Office365User.SearchUserV2()" as a datasource, you must use the same function to populate "Default" property of your combobox.

     

    ComboBox.Default: First(Office365Users.SearchUserV2({searchTerm:Parent.Email})).value
    

     

  • Prateek9 Profile Picture
    96 on at

    @WiZey 

    You are correct , Default property was blank for my combobox control . But even when i am trying to enter the code that you shared above , it is giving me an error , not sure if I am doing anything wrong.

    Default Property Blank

    Prateek9_0-1680094112386.png

     

    Error when entering the code (ComboBox1 is the name of the control)

    Prateek9_1-1680095274534.png

     

     

  • WiZey Profile Picture
    3,023 Moderator on at

    Don't put "ComboBox1.Default:" in the property, I wrote it only to make it more easy to understand.

  • Prateek9 Profile Picture
    96 on at

    Apologies  @WiZey 😅
    it slipped out of my mind but when i checked it again , i had recognized my error and made the changes. Still when i am entering the code in Default Property , in the part "Parent.Email" , there is no such thing as "Email" . Only below options are there :
    Border Color , Border Style , Border Thickness , Content Language , DataField , Default , DisplayMode, DisplayName , Error , Fill , Height , Max Length , Required , Update , Valid , Visible , Width , WidthFit , X , Y 

    Prateek9_0-1680164772160.png

     




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 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 96 Super User 2026 Season 1

Last 30 days Overall leaderboard