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 Automate / Extract otherMails fro...
Power Automate
Unanswered

Extract otherMails from AD user record

(0) ShareShare
ReportReport
Posted on by 6

Hello everyone,

I am very new to Power Automate and have been struggling with an issue for the past few days. I'm building a SharePoint employee listing  and would like to display "otherMails", which is set to the user's proper email address. I queried the AD user account for the fields, including "otherMails", to be displayed on the employee listing. I then used Parse JSON in order to allow me to extract the required data. When I run the flow, it appears to be extracting the data, including "otherMails", however I cannot seem to extract and save the data from "otherMails". Can someone please indicate exactly how I can extract the otherMails data that has been obtained from the query of the user profile? I have included details of my flow's run below:

 

geomin_0-1688427668411.png

I then set a variable with "otherMails" from Parse JSON:

geomin_1-1688427841167.png

I then create a list item. Notice that the email field, which specifies my variable, is blank:

geomin_4-1688428133132.png

 

Here is the flow's config:

geomin_5-1688428296391.png

...

geomin_6-1688428430552.png

All fields, except E-Mail/OtherMail, are present in the SharePoint list.

 

Any assistance would be appreciated.

 

Thank you

 

George

 

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    @geomin , please note that OtherEmails is an array. You need to extract the item from the array before saving them into SharePoint.

    You could try something like

    json(variables('OtherEmails'))[0]

    If the field is blank this will throw an error, so perform a conditional check as well

     

  • geomin Profile Picture
    6 on at

    Hello @SudeepGhatakNZ ,

     

    thank you for your assistance. When I try to evaluate the length of the "otherMails" to determine if it is empty, I receive an error indicating that it is a null value. I'm not  sure why it is doing this. 

    geomin_1-1688437163594.png

     

     

    geomin_0-1688437055612.png

     

    Thank you

    George

     

  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    can you add the following in compose on top of the condition?

    body('Parse_User_Profile')['body']?['otherEmails']

     

    I have a suspicion it is returning null for some records

     

     

  • geomin Profile Picture
    6 on at

    Hi @SudeepGhatakNZ, I assume you meant this:

    geomin_0-1688476889623.png

    I used the output of the Compose in condition3 and again in the set variable, after the condition is evaluated:

    geomin_1-1688477144632.png

    The process then fails when setting the variable:

    geomin_2-1688477312451.png

    Would the Compose not have replaced ''body('Parse_User_Profile')['body']?['otherEmails']" with the actual value in the array? I assume that I would set the variable via "

    json(outputs('Compose_otherMails'))[0]".
     
    Thank you!
     
    George
     

     

     

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 378 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 305 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 155 Most Valuable Professional

Last 30 days Overall leaderboard