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 / Update multi select pe...
Power Automate
Unanswered

Update multi select person field with HTTP request -> skip unknown users

(0) ShareShare
ReportReport
Posted on by 79
Hi all,
 
I need to update a multi select person field in a large list (> 14000 entries).
Currently I'm using a HTTP request to just update the field:
 
{
"formValues": 
[
{
"FieldName": "Besitzerprofil",
"FieldValue": "[

{ 'Key': 'email1(at)company.com' },

{ 'Key': 'email2(at)company.com' }

]"
}
],
"bNewDocumentUpdate":true
}
 
This work pretty fine and fast.
However if a user id does no longer exits the whole field is not updated even if the other users exist.
 
I know that I can check with the Office 365 user connector if the user is active or not BUT due to the sheer amount of list elements + up to 50 users per people field the runtime of the Flow would be endless and may exceed my daily limit of API calls.
 
Do you have any good suggestions for my problem? :)
 
Best regards
 
Edit: corrected the HTTP request according to user answer below, nothing changed.
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at
    Hi @FabvE,
     
    Edit: I totally misread your question 😅, ignore the below suggestion.

    Try and replace the Claims property by the Key property. Also use single quotes in the value.
     
    Can you try the below?
    "FieldValue": "[{'Key':'i:0#.f|membership|email1(at)company.com'},{'Key':'i:0#.f|membership|email2(at)company.com'}]"
    Here is a blog from Tom Riha, which explains this in more detail:
  • Zdenka_Cech Profile Picture
    101 on at
    Hi there
    1. Are you trying to update the field with an account which no longer exists from a list?
    2. Or the non-existing account is already the field you want to update?
    *Z
     
  • FabvE Profile Picture
    79 on at
    Hi all,

    it's the first one. The field is initially empty and I populate it with varying amounts of users.
     
    I tried that but it's the same. If only one user in the HTTP request is inactive none of the others will be put in the field. :(
  • Suggested answer
    Zdenka_Cech Profile Picture
    101 on at
    OK than I guess you would need to construct the flow without long loops to get active/enabled users:
    1. Get all enabled/existing accounts from our tenant in a simple array
    2. Next combine the 'Your accounts/emails list' with 'Tenant existing email list' array and add new column e.g. 'Exists' where you say e.g. 'Yes/No' if the account is not found.
    3. Then you filter the 'Combined' output with the new column 'Exists' equals 'Yes' //change as you want it is suggestion
    4. Finally loop/use the Filter array outputs accounts for your update action
    Details:
    1. Get all enabled accounts:
    Add  action 'Send an Http request' (Office 365 Users) Method: GET, Content-type: application/json; CustomHeader: ConsistencyLevel:eventual; URI: https://graph.microsoft.com/v1.0/users?$filter=accountEnabled eq true&$top=999&$count=true   //add more filters as needed 
    If you have more users in your system than 999 than you should use Pagination (Do-until) technique with @odata.nextlink and store the outputs in an array you will use later. https://learn.microsoft.com/en-us/graph/paging?tabs=http 
    2.-3. Combine accounts lists and mark not existing in the output table
    Use Select, transform to object and finally select with coalesce function as discussed in the video to get the table with users marked as you want for 'exist/not exists' in a new column: https://www.youtube.com/watch?v=R_bD8nAoJ8Y 
    4. Then use the Filter array action - from the last 'Select' to return only existing users (emails), based on the new column with coalesce expression for existing users, then loop through the filter output. //also in the video
    5. optional: You can even save your API calls using Batch update technique as discussed here: https://www.youtube.com/watch?v=2dV7fI4GUYU
     
    Take your time there are lot of steps, but works fine and saves lot of run time of the flow. 
    Also suggest you wrap related steps to Scope action so you can easily navigate inside the flow designer or follow with error handling if this is recurrent flow.
     
    Hope it helps

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard