0
votes
  • SharePoint 2010
  • Forms Based Authentication (FBA)
  • SqlMembershipProvider

Is there a way to retrieve FBA 'users-in-role' data via SP Web Services infrastructure?

It plays nicely when retrieving SharePoint Groups, Permissions and Roles, but how to get FBA users membership in FBA roles?

A 'GetRoleCollectionFromUser' method says 'user not found' for claims-based id like 'i:0#.f|fbamembershipprovider|fbaadmin3'. Any other ways?

1

1 Answers

1
votes

I don't think you'll be able to get it via SP Web Services. You'll have to use the role provider interface directly to query the roles. There are a couple of catches using the membership and role provider in SharePoint 2010 as well, as not all of the functions have been implemented in their "proxy" membership provider. I'd suggest looking at the code in the FBA Pack for some examples of how to do it. Utils.cs and UserEdit.aspx.cs should have some good examples for you:

http://sharepoint2010fba.codeplex.com/SourceControl/changeset/view/458f208d6152#Visigo.Sharepoint.FormsBasedAuthentication%2fVisigo.Sharepoint.FormsBasedAuthentication%2fCode%2fUtils.cs

http://sharepoint2010fba.codeplex.com/SourceControl/changeset/view/458f208d6152#Visigo.Sharepoint.FormsBasedAuthentication%2fVisigo.Sharepoint.FormsBasedAuthentication%2fLayouts%2fFBA%2fMANAGEMENT%2fUserEdit.aspx.cs