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 / How to Parse JSON from...
Power Automate
Answered

How to Parse JSON from a certain string ?

(0) ShareShare
ReportReport
Posted on by 1,042

Dear experts,

 

I want to show the profile pictures of users in an Adaptive Card.

 

I use this url as string:

https://teams.microsoft.com/api/mt/emea/beta/users/<email-address>/profilepicturev2?displayname=<displayname>&voidCache=false

 

I use the string in a variable for multiple users. This is the result:

 

https://teams.microsoft.com/api/mt/emea/beta/users/
["test@email01.nl","test@email2.nl",]
/profilepicturev2?displayname=
["Jackson, M (Michael)","Eastwood, C (Clint)"]
&voidCache=false

 

But now i have to parse it using the Parse Json connector.

Only there are 2 arrays instead of one. And what about the url itself?

What can i do to get it like this:

 

https://teams.microsoft.com/api/mt/emea/beta/users/test@email01.nl/profilepicturev2?displayname=Jackson, M (Michael)&voidCache=false
https://teams.microsoft.com/api/mt/emea/beta/users/test@email02.nl/profilepicturev2?displayname=Eastwood, C (Clint)&voidCache=false

 

Gr.P

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    @PeKi72 Where are you getting the Email and Display Name from? Are they coming from a multi-select Person column? If so, then here's a quick example that might work for you.

     

    For this example, I'm using the following list. We will retrieve the first item and get the Members.

    grantjenkins_0-1672370281813.png

     

    I'm using Get item to retrieve the first item in the list. Then Select to extract out each of the Members and build up the URL within Map. Note that I'm using Text mode (see arrow on screenshot below) so we get a simple array of URLs. The expression used for the Map to build up the URL is below.

    concat('https://teams.microsoft.com/api/mt/emea/beta/users/', item()?['Email'], '/profilepicturev2?displayname=', item()?['DisplayName'], '&voidCache=false')

    grantjenkins_1-1672370477460.png

     

    This will give us the following output.

    [
     "https://teams.microsoft.com/api/mt/emea/beta/users/AdeleV@happywolf.onmicrosoft.com/profilepicturev2?displayname=Adele Vance&voidCache=false",
     "https://teams.microsoft.com/api/mt/emea/beta/users/LeeG@happywolf.onmicrosoft.com/profilepicturev2?displayname=Lee Gu&voidCache=false",
     "https://teams.microsoft.com/api/mt/emea/beta/users/MeganB@happywolf.onmicrosoft.com/profilepicturev2?displayname=Megan Bowen&voidCache=false"
    ]

    grantjenkins_2-1672370607656.png


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

  • CU16021406-1 Profile Picture
    1,042 on at

    Thank you very much 🙂 

     

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard