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 / 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,195 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

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard