I have configured FBA to work with SP 2016

I am looking at adding the roles defined in the SQL DB

The result should mean i get something like below added to SP


Does anyone know how can i add roles based on SQL FBA db hopefully via PowerShell

I currently get an error "The specified user cannot be found"


Make sure you have created a custom Role Provider for our SharePoint environment, which allows you to specify SharePoint roles and assign them to custom users.

The “Adding SQL users and roles for FBA” part cannot be completed using PowerShell.

Here are some articles you can refer to for this process:

  1. Step by Step – Configure SharePoint 2010 Forms Based Authentication with SQL.
  2. What configuration can be done using PowerShell: SharePoint Form-Based Authentication with SQL using PowerShell.
  3. Another one with video tutorial: Configuring Forms Based Authentication in SharePoint 2016 and SharePoint 2019 – Part 4 – Adding Users to the Membership Database.
  • Funny you can't PowerShell those roles over. Can they be added via c# – user3799810 Aug 20 '20 at 5:47
  • @user3799810 I’ve found a reference here using C#: c-sharpcorner.com/article/… possibly what you are looking for. – Chelsea_MSFT Aug 20 '20 at 5:54

This can be done using PnP PowerShell

Just not using using New-SPUser

The cmdlet that works is as below

New-PnPUser -LoginName "c:0-.f|FbaRoleManager|[groupname"

  • Thanks for the clarification. Can you share the cmdlet for this action? – Chelsea_MSFT Aug 21 '20 at 1:11
  • Updated answer above – user3799810 Aug 22 '20 at 3:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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