Try our conversational search powered by Generative AI!

This role cannot be deleted because there are users present in it

Vote:
 

Hello, I've been searching for a solution to this problem which says you can't delete an administrative group because this contains users. This is strange as there are no users in the group - 

When I'm trying to delete this group it prompts me with an error that shows a provider exception containing a message that - This role cannot be deleted because there are users present in it

Here is the stack trace

This role cannot be deleted because there are users present in it.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Configuration.Provider.ProviderException: This role cannot be deleted because there are users present in it.

Stack Trace:

[ProviderException: This role cannot be deleted because there are users present in it.]
   System.Web.Security.SqlRoleProvider.DeleteRole(String roleName, Boolean throwOnPopulatedRole) +719
   EPiServer.UI.Admin.DeleteMembershipDialog.DeleteUser_Click(Object sender, EventArgs e) +689
   EPiServer.UI.WebControls.ToolButton.OnClick(EventArgs e) +126
   EPiServer.UI.WebControls.ToolButton.RaisePostBackEvent(String eventArgument) +223
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5445

How can I still delete this group as there are no users and I don't need it to be in the system. Any help would be greatly appreciated.

Thanks,
Manoj

#223235
May 22, 2020 10:37
Vote:
 

Hi Manoj,

Which Commerce version are you using?  That link from Praful is from the user guide publsied on 2015-04-30. We have more up to date documentation.

#223246
May 22, 2020 15:53
Vote:
 

So, @Bob, 

When we click on Roles in Commerce Manager a message in Red color appears that to manage the roles go to CMS admin. So what make sense to me is that CMS Admin is the common place to manage the roles both for CMS and Commerce, right?

#223247
May 22, 2020 17:12
Vote:
 

I agree, Praful. That's why there is no Commerce User Guide topic titled "Creating and editing roles" in the recent help versions.

I don't know the answer to the original question. I suggest contacting the Epi Support team on that one.

#223249
May 22, 2020 19:57
Vote:
 

Hi Manoj,

I am able to delete the group with and without users in the QuickSilver solution, but not sure what is wrong in your case.

Let's move to the next step, can you try the below queries in the CMS database and see the result.

exec netPermissionDeleteMembership @Name=N'Catalog Entry Editor',@IsRole=1
exec netContentAclDeleteEntity @Name=N'Catalog Entry Editor',@IsRole=1
#223269
May 23, 2020 3:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.