web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / 'Specified user i:0#.f...
Power Apps
Answered

'Specified user i:0#.f|membership| could not be found" while trying to patch to SP list but value still gets patched

(0) ShareShare
ReportReport
Posted on by 65

 

I'm getting an error of "specified user i:0#.f|membership| could not be found" while patching a collection value to SharePoint list but value still gets patched correctly to the list.

 

Any ideas? 

 

Error:

DBJ_3-1592946034869.png

 

Patching statement 

DBJ_2-1592945950376.png

 

Categories:
  • KrishnaV Profile Picture
    5,023 on at

    Hi @DBJ ,

     

    i:0#.f|membership| This works with only the existing domain users see the below sample code for your reference:

    Patch(
     'Project Details',
     Defaults('Project Details'),
     {Title: TextInput6.Text},
     If(
     !IsBlank(TextInput7.Text),
     {
     Collaborator: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Claims: "i:0#.f|membership|" & Lower(TextInput7.Text),
     Department: "",
     DisplayName: "",
     Email: Lower(TextInput7.Text),
     JobTitle: ".",
     Picture: "."
     }
     }
     )
    );


    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • DBJ Profile Picture
    65 on at

    Hi @KrishnaV 

     

    This is for the existing domain user, that is why it's strange that it is not working. Like I mentioned before the value gets patched correctly to the list but an error still gets thrown.

  • KrishnaV Profile Picture
    5,023 on at

    Hi @DBJ ,

     

    That is strange one last possibility is a user might be expired (I am account deactivated).


    I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

    Regards,
    Krishna
    If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @DBJ ,

    Could you please share a bit more about the "OfficerNameCol1" variable? Does it store the display name of the user?

     

    Based on the formula that you mentioned, I think there is something wrong with it. The value provided for the Claims attribute should contains the email address of the user rather than Display Name. The standard value format for the Claims attribute should be as below:

    "i:0#.f|membership|user1@email.com" 

     

    On your side, please consider modify your formula as below:

    {
     'Officer Name': {
     Claims: "i:0#.f|membership|" & Lower(LookUp(Office365Users.SearchUserV2().value, DisplayName = OfficerNameCol1).Mail),
     DisplayName: OfficerNameCol1,
     Email: LookUp(Office365Users.SearchUserV2().value, DisplayName = OfficerNameCol1).Mail,
     Department: "", 
     JobTitle: "", 
     Picture: ""
     }
    }

    Note: Firstly, you need to add Office 365 Users connection as data source in your app before trying above formula.

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi ,

     

    I am getting the same issue but I am using Combo box and User should select multiple user. When I select on Edit I am getting error when I select user again then it will not give me error.

    ForAll(
    cb_MP_Owner_2.SelectedItems,
    Collect(
    colPeople,
    {
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims: "i:0#.f|membership|" & ThisRecord.Mail,
    Department: "",
    DisplayName: ThisRecord.DisplayName,
    Email: ThisRecord.Mail,
    JobTitle: "",
    Picture: ""
    }
    )
    );

    I am Storing the value in Collection : colPeople and then patching the collection in owner column. The above code works fine while adding.Could you please let me know what is the issue here.

  • ezi79 Profile Picture
    166 on at

    I got the similar issue . I am editing record from gallery item selected.  People picker is a combo box when i try to edit my record i have to re-select the user  form the combo box in order to update the record. When i play the app i get the 'Specified user i:0#.f|membership| could not be found" while trying to patch to SP list but value still gets patched error.
    SubmittedOrPM: {
    '@odata.type': "#Microsoft.Azure.Connectors.Sharepoint.SPListExpandedUser",
    Claims: "i:0#.f|membership|" & combopm_1.Selected.Mail,
    Department: "",
    DisplayName: "",//combopm_1.Selected.DisplayName,
    Email: "",//combopm_1.Selected.Mail,
    JobTitle: "",
    Picture: ""

    Could you please help?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I ran into this |membership| error while setting the DefaultSelectedItems property to the current user, using a variable and the Office 365 Users connector. A formula I had used many times before just stopped working and threw this error. I resolved it by pasting this into the DefaultSelectedItems:

     

    { 
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", 
    DisplayName:User().FullName, 
    Claims:"i:0#.f|membership|" & Lower(User().Email), 
    Department:"", 
    Email:User().Email, 
    JobTitle:"", 
    Picture:"" 
    }

     

    I'm defaulting the field to the current user, but they could remove their own name and enter someone else's. So elsewhere in the app, I am still using the Office 365 Users connector to look at the DataCardValue.Selected person and get their manager and job title. But for the initial default user -- I found that only this code (above) worked.

    Thanks to: https://mohitvash.wordpress.com/2021/06/17/power-apps-set-default-value-to-sp-user-or-group-field/

  • hsfournier Profile Picture
    106 on at

    Hi RachelRig, I also had to use this code to sort out a problem I was having where I had a people column in a canvas app. In the app users create new cases, and they would start typing and a name would appear, but when they tried to save the new case they were getting an error. I am not sure if you can help me with my question (and hopefully it isn't a silly question), but my understanding is this is due to these employees being de-activited as they were on long term leave, so by using this code am I re-adding them to Active Directory? Because I know from our IT's perspective they will not be happy to find that licences are being used up for people they have deactivated. Again, I am not sure if this is something you can help me with, but I thought I would ask.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @hsfournier No, I don't believe we can actually add/remove/activate users in Active Directory with functions used here in this way. I know for certain that I got this error on active users who had definitely not left the company or anything like that. This error was a complete mystery to me. As I said, code I had been using for months just suddenly didn't work anymore. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi all, having a similar issue. Getting an error that states "The requested operation is invalid. Server Response: Employee Changes failed: The specified user i:0#.f|membership| could not be found"

     

    My submit button code is below. The form is always in FormMode.New if that makes a difference as these forms don't get edited in this use case. Any help is appreciated 🙂

     

    SubmitForm(Form2);
    Patch(
    'Employee Changes',
    Form2.LastSubmit,
    {
    Title: "EmployeeName",
    'Employee Name': {
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims: "i:0#.f|membership|" & Lower(DataCardValue11.Selected.Mail),
    DisplayName: DataCardValue11.Selected.DisplayName,
    Department: "",
    Email: DataCardValue11.Selected.Mail,
    JobTitle: "",
    Picture: ""
    }
    }
    )

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard