Skip to main content
Community site session details

Community site session details

Session Id : MwYn1B9Y61zWZCJJwzRKLh
Power Automate - Building Flows
Answered

REST API - Cannot add users to a column of type "User" to SharePoint list

Like (0) ShareShare
ReportReport
Posted on 15 Jul 2021 13:55:45 by

Hi, I'm currently building a flow that creates a column named "Assigned To" using an HTTP request. The column is being created but when I try to add a row with a user (using email), it shows up as blank. There are no errors but nothing shows up. Here are screenshots:

 

Create field:

createfield.JPG

 

Add row:

addrow.JPG

DMTM Email is just a string that contains an email address. Is the ""Assigned_x0020_To": {result: '@{outputs('Get_new_item')?['body/DMTM/Email']}'}" line incorrect?

 

Thank you,

Arthur

 

  • Expiscornovus Profile Picture
    32,205 Most Valuable Professional on 31 Mar 2022 at 07:40:59
    Re: REST API - Cannot add users to a column of type "User" to SharePoint list

    Hi @RMD211,

     

    If that is the response you are getting to check for the loginName it means it was not able to find the correct user.

     

    But like mentioned earlier. That additional HTTP request is not really required, it is only to validate when you are unsure.

     

    Normally you could just use the i:0#.f|membership|emailaddress syntax for the LoginName value (when it is an internal user) with the validateupdatelistitem method. Did you try that approach first?

  • RM-30040732-0 Profile Picture
    463 on 30 Mar 2022 at 15:04:18
    Re: REST API - Cannot add users to a column of type "User" to SharePoint list

    Hi! I'm trying to use your solution above - but my Send http request is showing like this.  Any ideas how to get results and therefore the LoginName back from this?

     

    {
      "d": {
        "results": []
      }
    }
  • Expiscornovus Profile Picture
    32,205 Most Valuable Professional on 15 Jul 2021 at 14:52:04
    Re: REST API - Cannot add users to a column of type "User" to SharePoint list

    Hi @Anonymous,

     

    Typically that would just be i:0#.f|membership|emailaddress

     

    If your really want to be sure you could retrieve that via another request. You can use the SiteUsers endpoint and retrieve the LoginName property.

     

     

    _api/Web/SiteUsers?$filter=Email eq '@{variables('EmailAddress')}'&$select=LoginName

     

     

    getclaimuser.png

     

    You can retrieve the first value via this expression:

     

    outputs('Send_an_HTTP_request_to_SharePoint_-_Get_Claim')?['body']['d']['results'][0]['LoginName']

     

     

  • Community Power Platform Member Profile Picture
    on 15 Jul 2021 at 14:35:20
    Re: REST API - Cannot add users to a column of type "User" to SharePoint list

    Thanks @Expiscornovus for answering!

     

    How do you obtain the user key and membership? I just have their email address.

     

    Thanks,

    Arthur

  • Verified answer
    Expiscornovus Profile Picture
    32,205 Most Valuable Professional on 15 Jul 2021 at 14:26:15
    Re: REST API - Cannot add users to a column of type "User" to SharePoint list

    Hi @Anonymous,

     

    You could use the ValidateUpdateListItem method for this. With this method you can use the key and the user claim to update the person field. A user claim would be something like this i:0#.f|membership|janedoe@contoso.onmicrosoft.com

     

     

    {
     "formValues":[
    	{
    	 "FieldName": "Assigned_x0020_To",
    	 "FieldValue": "[{'Key':'@{variables('UserClaim')}'}]"
    	}
     ]
    }

     

    update_personfield.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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete