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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Compare User id from p...
Power Automate
Answered

Compare User id from planner task with user email from a list (lists)

(0) ShareShare
ReportReport
Posted on by 15

Hi there, 

I have a flow with lists and tasks. When I am creating a task a flow creates a list element and puts the task id into the list. So both are connected to each other. 

A second flow checks if a list element has changes and updates the planner task. 

My problem is that the information of users in lists have no id's but only emails or names. The task of planner has users only with assigned id.

 

So I need a solution to get the users id from the list element to compare them with the users id from the task. 

I want to compare the users in a task with users in a list. If a user in the task is missing it takes the users from lists and assigned it to the task or delet a user if the user is in the task but not in the list.

 

Hope my english is o.k. so you understand what I want to do. thx. 🙂

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,870 Most Valuable Professional on at

    Hi @FOX23,

     

    You could use a Get User Profile (v2) action to retrieve the user and its attributes (like Email and User Principal Name). You can use that to compare it to person specified in the person or group type of column (AssignedTo in my example) in the list.

     

    Below is an example of such an approach.

     

    1. Id of first assigned user in task in Planner in a Get user profile (v2) action

    outputs('Get_a_task')?['body/_assignments'][0]['userId']

     

    2. Get Items action with a Filter which checks if the list item already exists

    TaskId eq '@{outputs('Get_a_task')?['body/id']}'

     

    3. Condition which checks if it has found an item

    length(outputs('Get_items')?['body/value'])

     

    4. In a nested condition it is checked if the Email of the current AssignedTo user is the same as the one found in the Task

    outputs('Get_items')?['body/value'][0]['AssignedTo']['Email']

     

    5. In the update item the id & title are reused from the first matching item via these expressions

    outputs('Get_items')?['body/value'][0]['Id']
    outputs('Get_items')?['body/value'][0]['Title']

     

    checkid_userprofile.png

  • FOX23 Profile Picture
    15 on at

    Thanks, it is much easier as I worked on my flow 🙂 With this I can now do my mini Projekt Management using lists. Perfect. Your solution helps me to go to the next steps. 

     

    FF 🙂

    (FlyingFox)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard