cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Getting "The specified user i:0#.f|membership| could not be found" error when patching SPO list

Have an app that is trying to write to a SPO list, but errors out.  Below is the code from the statement.

 

SubmitForm(ApprovalForm);

 

UpdateContext({var_ApproveReqID: ApprovalForm.LastSubmit.ID, var_ApproveReqEmail: Text(ApprovalForm.LastSubmit.Author.Email),
var_ApproveReqDisplayName: Text(ApprovalForm.LastSubmit.Author.DisplayName)});

 

Patch(RequestAudit, Defaults(RequestAudit),
{Title: txt_ReqReviewTitleValue.Text,
Action: {Value: "Approved request"},
RequestedBy: {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|" & Lower(var_ApproveReqEmail),
Email:var_ApproveReqEmail,
Department:"",
DisplayName:var_ApproveReqDisplayName,
JobTitle:"",
Picture:""},
ActionTakenBy: {'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|" & Lower(User().Email),
Email:User().Email,
Department:"",
DisplayName:User().FullName,
JobTitle:"",
Picture:""},
RequestID: var_ApproveReqID

}
)
});

 

Any help is greatly appreciated.

3 REPLIES 3
Super User
Super User

Re: Getting "The specified user i:0#.f|membership| could not be found" error when patching SPO list

Is that the exact formula? I ask because formula has an extra "}" and that would show as an error in formula box. If that is just a typo in the post then you should look at the value in the variable var_ApproveReqEmail and make sure that is correct.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Re: Getting "The specified user i:0#.f|membership| could not be found" error when patching SPO list

It wasn't a typo.  The Patch statement is in an UpdateContest statement for error catching purposes.  

 

After some playing around, the issue appears to be with LastSubmit.  For some reason, it isn't grabbing the metadata of the submitted record.  When I changed the source of the variable from LastSubmit to RequestGallery.selected, everything works fine.  Does anyone know of anything going on with LastSubmit?

Super User
Super User

Re: Getting "The specified user i:0#.f|membership| could not be found" error when patching SPO list

Have you tried moving the formula starting at UpdateContext to the OnSuccess property of the form. This should help make sure that the form was successfully submitted before LastSubmit is used in the variables.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 102 members 5,475 guests
Please welcome our newest community members: