VERIFIED SOLUTION i

How to delete a user from AccessControl database in Officemail

The following script will delete a user from the database.

1. Delete the user in Admin website, Organization -> Organization -> Show users, then drag the user to the bin.
Then run the script on the SQL server, replacing Email value with the users e-mail address:

USE [AccessControl]

declare 

@UserId uniqueidentifier

SELECT  @UserId = UserId FROM dbo.aspnet_Membership WHERE Email = 'joe.bloggs@abc.com'

DELETE 
FROM    dbo.aspnet_UsersInRoles
WHERE UserId = @UserId

DELETE    
FROM  dbo.aspnet_Membership 
WHERE UserId = @UserId

DELETE
FROM  dbo.aspnet_Users                       
WHERE UserId = @UserId
 
Environment Details

 
UPDATED:  June 27, 2017