简体   繁体   中英

How to update aspnetmembership FBA users profile property (PasswordChangeRequired ) in sharepoint 2010 using c#

Remove alert | Edit | Delete | Change type Question You cannot vote on your own post 0

Hello,

I have a requirement to update the user profile property (PasswordChangeRequired) for all the FBA users in a SharePoint 2010 external site. See the below image for more clarity on requirement.

Please post if anyone have solution for it. please find screenshot. I have followed the below link for reference.

https://msdn.microsoft.com/en-us/library/office/ms518939(v=office.14).aspx

But I am getting error at the below line of code.

Error Description: An error was encountered while retrieving the user profile.

UserProfile u = profileManager.GetUserProfile(sAccount);

Note: I am getting error in both the cases, either sAccount varibale is in format(Domain/userId) or in the FBA format(abc@xyz.com)

This might be caused by the fact that the mysite of the users doesn't exist yet. Have they logged in yet? If not, it's quite possible the mysites for the users aren't created yet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM