Search code examples
sharepointazure-active-directoryazure-logic-appspower-automate

Insert User through Sharepoint batch send HTTP Request Connector


I need to insert items into sharepoint by using SP connector - Send HTTP Request I send body : "User": { "Key": "i:0#.f|membership|@{first(body('Get_by_mail')?['value'])['Email']}" }, Despite it having successfully created, the sharepoint shows the field without value. Do you have any idea what could be going on?


Solution

  • After reproducing from my end, I could able to make this work using the below JSON in the body while sending the HTTP request.

    {    
    "__metadata": { "type": "SP.Data.<YOUR_LIST_NAME>ListItem" },    
    "Title": "ccc",    
    "UserId": 6
    }  
    

    UserId is the key which represents the column in my Sharepoint which is named as User. Consider if Person is the column in your Sharepoint then make sure you set the key value as PersonId.

    enter image description here

    Results:

    enter image description here