1. I need to authenticate the user based on Windows AD group credentials
  2. Once the user got authenticated the site level, library level or lists level authorization should be derived from SQL data. The user information will be saved in SQL database which should be used for authorizing the user.

How can we automatically add/remove users based on SQL data into our sharepoint group?

  • Hi and welcome to SP.SE! AD is usually in control of credentials, and adding additional credentials needs further planning. Will you continue to synchronize AD authentication or will you just use your Database for authentication. In that case you may have old user which shouldn't have access, and new users not allowed in. Interesting question though, even if I don't see the reason why.
    – Benny Skogberg
    Nov 26, 2013 at 7:12

1 Answer 1


You need to implement custom claims provider with Role Provider class. In Role provider you need to override two main methods:

  1. GetRolesForUser(userName).
  2. RoleExist(roleName).

You need to implement these two methods with logic to fetch roles from SQL database according to your requirement.

In first method, you need to fetch all roles available for the specified user and create claims for each role. In second method, you just need to verify if the Role exist in your database and if yes then return true otherwise return false.

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.