2

We are using FBA accounts to grant external access to non staff in SP2010 Enterprise.

I need to find a way of discovering the memberships of the FBA roles so I can audit who has access to our sites.

I'm currently looking at running an SQL query against the FBA database but thought there may be another way.

1
  • 2
    Running a SQL query will probably be the quickest way to meet your needs.
    – HarryB
    Commented Nov 25, 2015 at 11:12

2 Answers 2

1

You can try SharePoint 2010 FBA Pack. Hope it may help.

Project Description reads

A forms based authentication pack for SharePoint 2010. It includes web parts for registering users, changing passwords and password recovery. It includes tools for managing users and roles and for approving registrations.

5
  • Already use this and although it is a nice solution it does not allow you to see the users within the role - it only provides a quantity of users. Thanks though
    – JazzyN
    Commented Nov 25, 2015 at 11:32
  • Sorry to hear that. Source code is there. Give a try to modify it and then share it with us. Commented Nov 25, 2015 at 11:40
  • 2
    In the FBA pack code there is a method: Utils.BaseRoleProvider().GetUsersInRole
    – Prakash
    Commented Nov 25, 2015 at 12:33
  • You have added a very useful information I guess. @Prakash-CrowCanyon thanks Commented Nov 25, 2015 at 12:36
  • I'm not a developer though so I have had to create a query which I'll post as an answer for anyone who is interested. Thanks @Prakash-CrowCanyon
    – JazzyN
    Commented Nov 25, 2015 at 13:06
1

Running this query does the trick however I am sure there are superior solutions out there:

SELECT ROLE.RoleName, USERS.UserName, MEMBER.Email
FROM aspnet_Users AS USERS
INNER JOIN aspnet_UsersInRoles AS USERSINROLE
ON USERS.UserId = USERSINROLE.UserId
INNER JOIN aspnet_Roles AS ROLE
ON UsersInRole.RoleId = Role.RoleId
INNER JOIN aspnet_Membership AS MEMBER
ON USERS.UserId = MEMBER.UserId
ORDER BY ROLE.RoleName

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.