cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lui
Helper IV
Helper IV

Saving Person column to SharePoint from PowerApps using Power Automate

I have a scenario where I need to use the HTTP to Sharepoint action in Power Automate to save my data from Power Apps.

The power automate flow seems to create a new item in the SharePoint for all columns except a Person column which I continue to get an error.

 

I'm passing the data from Power Apps using the following code:

 

 

Set(varPerson, 
 {
 Claims:"i:0#.f|membership|" & Lower(myemail@abc.com),
 DisplayName:Office365Users.UserProfileV2(myemail@abc.com).displayName,
 Email:myemail@abc.com,
 Picture:"",
 Department:"",
 JobTitle:""
 });

'API-POST'.Run(
 "Comments",
 "POST",
 0,
 JSON(
 {
   Audience:"External",
   Comment:"Testing",
  Item:"Comment",
  Person:varPerson             
 }))

 

 

When I run the Power Automate, this is the error I'm getting:

Spoiler
{"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"A 'PrimitiveValue' node with non-null value was found when trying to read the value of a navigation property; however, a 'StartArray' node, a 'StartObject' node, or a 'PrimitiveValue' node with null value was expected."}}}


As you can see on the screenshot below, I'm sending the body from Power Apps to Power Automate through JSON.

 

Screenshot 2021-01-24 075121.png

 

Can anyone tell me how to send the person array correctly? I feel like I'm missing something. 

Thanks ahead

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @lui,

 

There is no need to use Send HTTP request to SharePoint to append value into person field.

If the field is multiple person, after getting value from the PowerApps and parse JSON it to get the Emails, then structure the array as below:

[
{
 "Claims": "EmailA@domain.com"
},
{
 "Claims": "EmailB@domain.com"
}
]

Screenshot 2021-01-25 141204.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-litu-msft
Community Support
Community Support

Hi @lui,

 

There is no need to use Send HTTP request to SharePoint to append value into person field.

If the field is multiple person, after getting value from the PowerApps and parse JSON it to get the Emails, then structure the array as below:

[
{
 "Claims": "EmailA@domain.com"
},
{
 "Claims": "EmailB@domain.com"
}
]

Screenshot 2021-01-25 141204.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,034)