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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to get clear phone...
Power Automate
Unanswered

How to get clear phone number from Office 365 User Profile using Business Phones Item option

(0) ShareShare
ReportReport
Posted on by 65

Hi all,

We have made a flow to get data from Office 365 user profile. When we use dynamic content "Business Phones Item" to get a phone number in an e-mail, we get the phone number surounded by square brackets and qutoes. But, when we use Mobile Phone option we get a regular form of number. Is it possible to remove all other values, and leave just the phone number, when we use "Business Phones Item" option? Using replace expression, or any other way?

Screenshot_1.pngScreenshot_2.png

Screenshot_3.png

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,175 Most Valuable Professional on at
    Re: How to get clear phone number from Office 365 User Profile using Business Phones Item option

    Hi @Rados,

     

    The reason why the fields are behaving differently is because the Mobile Phone field can only contain one value and the Business Phones field can contain multiple phone numbers (Array).

     

    If you want to collect the first item without quotes you can use the following expression:

    outputs('Get_user_profile_(V2)')?['body/businessPhones'][0]

     

  • Rados Profile Picture
    65 on at
    Re: How to get clear phone number from Office 365 User Profile using Business Phones Item option

    @Expiscornovus ,

    That's it! Thank you!

  • SAIL Profile Picture
    4 on at
    Re: How to get clear phone number from Office 365 User Profile using Business Phones Item option

    I'm having the same issue.  I've attempted to pull the O365 user list with the search for users (V2) and all the fields I need come over except business phone (due to it being an array).  What I can't figure out is where to insert the code above.  I tried pasting it into the Fx window to no avail.  Where should I go from here?

    SAIL_0-1666760529690.png

     

    When I add the code to the expression field I get the following error.

    SAIL_2-1666761132976.png

     

     

  • Rados Profile Picture
    65 on at
    Re: How to get clear phone number from Office 365 User Profile using Business Phones Item option

    Hi @SAIL ,

     

    It seems that the step Get user profile v2 is missing.

  • Expiscornovus Profile Picture
    33,175 Most Valuable Professional on at
    Re: How to get clear phone number from Office 365 User Profile using Business Phones Item option

    Hi @SAIL,

     

    When you want to refer to this property within a loop you can use item()['nameoffield'] approach.

     

    In your case try:

     

    item()?['businessPhones']

     

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard