Unable to delete users from the IT Analytics console
search cancel

Unable to delete users from the IT Analytics console

book

Article ID: 211276

calendar_today

Updated On:

Products

IT Analytics Data Loss Prevention

Issue/Introduction

When attempting to delete an IT Analytics (ITA) user from within the Security security settings tab, you are first prompted to either take ownership of the user's views or delete them:

After selecting either option, the following error is returned with a reference to the user to be deleted:

Exception: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://www.baydynamics.com/ITAnalyticsServer/Contracts:UserID. The InnerException message was 'There was an error deserializing the object of type System.Guid. The value '<domain>\<user>' cannot be parsed as the type 'Guide'.'. Please see InnerException for more details.

Environment

Release : 2.9.x

Component : Security

Resolution

This behavior is caused by a known limitation. As a workaround, the following script can be used to automate the process of removing users and transferring ownership of their cube views to another user:

USE ITAnalytics;
GO

DECLARE @NewViewOwner AS nvarchar(255),
      @UserToDelete AS nvarchar(255),
      @NVOPortalID AS nvarchar(255),
      @U2DPortalID AS nvarchar(255)

SET     @NewViewOwner = '' /* Enter the username (e.g., 'DOMAIN\User') of the portal user taking view ownership */
SET     @UserToDelete = '' /* Enter the username (e.g., 'DOMAIN\User') of the portal user to be removed */
SET     @NVOPortalID =  (
                        SELECT PortalUserId
                        FROM   dbo.PortalUsers
                        WHERE  Username = @NewViewOwner
                      )
SET     @U2DPortalID =  (
                        SELECT PortalUserId
                        FROM   dbo.PortalUsers
                        WHERE  Username = @UserToDelete
                      )

UPDATE  dbo.CubeViews
SET     OwnerPortalUserId = @NVOPortalID
WHERE   OwnerPortalUserId = @U2DPortalID;

DELETE
FROM    dbo.PortalUsers
WHERE   PortalUserID = @U2DPortalID;
GO