Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Retrieving an ExtensionAttribute and using the string value as email address

(0) ShareShare
ReportReport
Posted on by 5

Hi all, 

I am trying to use an extensionAttribute from AAD (extensionAttribute2) and use that field to supply an email address to use for a mailout.

Basically the flow is (supposed) to identify that a new user has been added to a particular Microsoft Teams channel, grab some files from a sharepoint site, then attach those files, then send an email to their personal email address (which is placed into the extensionAttribute2 field upon creation of user via Powershell).

Nearly everything works except for the very last step, the retrieval of the email address, where the flow breaks. I am just struggling to work out how to tell the "Send an email (V2)"  section with the value from AAD (which is synced up from AD on-prem). The value is there in AAD, but I just can't work out how to grab that value and use it as the TO" field in the outgoing email.

I was originally trying to use this to get the value, but pretty sure I am miles off and should be using another way.

ITGAdmin_0-1700198705532.png

Any assistance would be greatly appreciated. It's the only part I can't get to successfully work.

  • ITGAdmin Profile Picture
    5 on at
    Re: Retrieving an ExtensionAttribute and using the string value as email address

    That did the trick. Many thanks. Very much appreciated.

  • Verified answer
    Expiscornovus Profile Picture
    32,102 Most Valuable Professional on at
    Re: Retrieving an ExtensionAttribute and using the string value as email address

    Hi @ITGAdmin,

     

    As far as I am aware all extensionAttributes are nested within the onPremisesExtensionAttributes field/property. Can you try and use that one instead?

     

    Below is an example

     

    outputs('Get_user_profile_(V2)')?['body']['onPremisesExtensionAttributes']['extensionAttribute2']

     

    selectextensionattributes.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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1