Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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. 🙂

  • FOX23 Profile Picture
    15 on at
    Re: Compare User id from planner task with user email from a list (lists)

    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)

  • Verified answer
    Expiscornovus Profile Picture
    31,641 Most Valuable Professional on at
    Re: Compare User id from planner task with user email from a list (lists)

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,631 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,991 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow