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 / Office365 Connector - ...
Power Apps
Unanswered

Office365 Connector - How to validate an email address?

(0) ShareShare
ReportReport
Posted on by 514

The user enters an email into a text box and I am trying to check it exists.

Is there a way of passing this email to the Office365 connector and check it exists?

 

If the email exists I then run my patch code to save the record.

 

Any code example appreciated

 

Thanks

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,127 Most Valuable Professional on at

    Not exactly the same thing, but you could use the email address as the parameter for a call to get the user's profile.  If the profile isn't null then the user exists and the email address is valid.  It wouldn't work for anyone who has never logged in to Office 365 or for external users.  But it should work for any internal user.

  • sienna28 Profile Picture
    514 on at

    Thanks

     

    Could you please give me an example?

    Should I use IsBlank, IsEmpty….bit unsure

  • Pstork1 Profile Picture
    69,127 Most Valuable Professional on at

    Add the following to the visible property of a label that says "Email Does Not Exist" where txtEmail is the textbox the user types the email address into.

    If(IsBlankOrError(Office365Users.UserProfileV2(txtEmail.Text)),true,false)

      Then add a similar function to the displaymode property of the button to submit.

    If(IsBlankOrError(Office365Users.UserProfileV2(txtEmail.Text)),DisplayMode.Disabled,DisplayMode.Edit)

     If the email has a profile then the button will activate.  If not the button will stay disabled and the error message will activate.

  • sienna28 Profile Picture
    514 on at

    Thanks, I think that will work up to a point,

    I did find one user in the Office365 connector did not have an email address.

    So although it would detect a profile, in some instances it would not be a valid email if one does not exist.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard