Can someone please guide me on How to sync user profiles from aspnetdb (FBA users)?

We do not have AD, So we need to Create and Sync the User Profile of Sharepoint with aspnetdb.

Just to add more information here:

We are migrating from WSS 3.0 to SP2010 EE.

5 Answers 5


I just resolved similar problem. After some researching and after reading Morten's answer I ended up with coding custom timer job.

You can apply standard FBA settings for Claims Based Authentication in machine.config (X:\\Microsoft.NET\Framework64\v2.0.50727\CONFIG) instead of changing IIS (Sharepoint) web.config and by doing so Sharepoint Timer Job Service (OwsTimer.exe) can access this settings by default.

After that you can use System.Web.Security.Membership (look at Morten's answer/code) in your custom timer job.

I will provide more details if needed.


It is not possible to configure the user profile synchronization service to import users from other sources than the built in synchronization sources (AD DS, Novell, Tivoli....)

I dont think it is possible to write your own synchronization connection - there are absolutely no documentation, and after having poked around i reflector for days i found no where to register such a synchronization source, and also it seemed like a lot of work - so that was a dead end.

In my case my users were provided by the SQLMembershipProvider, which stores the users in the aspnetdb - but you can use my approach on all membership providers.

You can get all users from a MembershipProvider by issuing the following command System.Web.Security.Membership.GetAllUsers(), if your application is configured to use your membershipprovider as default mebership provider.

Unfortunately this must be done in configuration (web.config, app.config). Because i did not want to mess with the Membership section of the OwsTimer.exe (Sharepoint timer job service) config file, i ended up doing the profile import from a windows service.

Basically you would create a new UserProfile manager and do the following:

foreach (MembershipUser user in System.Web.Security.Membership.GetAllUsers())
    //Get the claim for the user
    var claim = new SPClaim(

    //Create or retrieve the user profile
    UserProfile profile = !userProfileManager.UserExists(claim.ToEncodedString()) ? 
        userProfileManager.CreateUserProfile(claim.ToEncodedString()) : 

    //Set profile properties


Tadaa thats it

  • AD DS, Novell, Tivoli and SunOne are sources, but you left out LDIF, which I believe may be a possible solution to this.
    – Tom Resing
    Commented May 12, 2011 at 2:54

This is a stretch, but I think you could do it using the LDAP Import from LDIF. LDIF is just a flat file format, but it's pretty simple. I'm sure you could expose your user data as LDIF. There are more details on TechNet and a summary on a technet blog post.


From a colleagues experience who tried to do this, and fialed, I think it is not possible. He ended up doing code to update users directly in code against user profiles

  • Thanks, Is that code available on the net?
    – neo269
    Commented Apr 29, 2011 at 7:54
  • I will ping my former colleague and ask him. Commented Apr 29, 2011 at 10:41
  • 1
    We had similar situation with External HR DB and used PowerShell to update profiles... I am just not sure if this is the answer you are looking for... Commented Apr 29, 2011 at 11:37

There is some video from AppDev showing how to do this staff. This is the content of the course: here. And in "Configure Forms Based Authentication with SQL Server" lesson they speak about how to make configuration and all the staff that you need .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.