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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Identify email address...
Power Apps
Unanswered

Identify email address to user list or group list

(1) ShareShare
ReportReport
Posted on by 314

Hi,

I have an email address list in one string which may contain user or group email addresses.  How can I identify which email address is a user or group email address? 

For example,

  email address list ==> "userA@CompanyA.com;userB@CompanyB.com;groupA@CompanyA.com;userC@CompanyA.com"

 I want to insert into a table collection like below:

 

Email                                       Type

==================   ====

userA@Company.com              user

userB@Company.com              user

groupA@CompanyA.com        group

userC@Company.com              user

 

How to do this?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @usaman45 ,

    You will need to add your actual list field names

    With(
     {
     _Data:
     Split(
     'Email Address List',
     ";"
     )
     }, 
     ClearCollect(
     MyCollection,
    	 RenameColumns(
     AddColumns(
     _Data,
     "Type",
     LookUp(
     EmailAddressList,
     EmailField = Value
     ).Type
     ),
     "Value",
     "Email"
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • cha_cha Profile Picture
    4,932 Moderator on at

    Hello @usaman45 

     

    It would be something like this but do test it out.

     

    For a start, you can have something like this:

     

    AddColumns(
    	RenameColumns(
    		Split(EmailString,";")
    		,"Value","Email")
    		,"Type",IfError(IsBlank(Office365Users.UserProfileV2(Email).displayName),"Group","User")
    )
    

     

  • 365-Assist Profile Picture
    2,324 Moderator on at

    You could use the Office 365 Group connector to find your groups -> Office 365 Groups - Connectors | Microsoft Learn

    It maybe easier to do this as a Power Automate Flow that's connected to your App.

    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw

    Regards
    Darren Lutchner - 365 Assist

  • TheRobRush Profile Picture
    11,128 Moderator on at

    IF these are internal emails, you could technically search your directory for them, mailing lists would not have a listing in the user directory. Something like this.

    ClearCollect(
    		emailStatus, 
    			ForAll(
     Split(
    			"userA@CompanyA.com;userB@CompanyB.com;groupA@CompanyA.com;userC@CompanyA.com;rob.rush@powerapps.com", 			";") As emailList, 
     {
     emailAddress: emailList.Value,
     emailType: If(
    						IsEmpty(
    							Office365Users.SearchUser({searchTerm:emailList.Value})), 
    							"Mailing List", 
    							"Personal"
    							)
     }
     ))

     

    would have results like this

     

    TheRobRush_0-1707172269109.png

    If these are external emails / mailing lists, you probably cannot accomplish this

     

  • usaman45 Profile Picture
    314 on at

    These solutions OK but what happened if the user's email is not exists, then email address become is group type? will it able to check also is not a group email address? 

  • TheRobRush Profile Picture
    11,128 Moderator on at

    I don't think you can find mailing lists this way so wouldn't be able to verify them. But I would ask @Pstork1  perhaps he knows a way in PA that I am unaware of.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard