Client Management Suite

 View Only

 Is there a way to view the CMS console login history?

William Yiing's profile image
William Yiing posted Apr 05, 2022 03:51 AM
For example, I would like to see the history of console login for all the user account with status such as success/failure/password incorrect with the date/time.
MATT SWALLOW's profile image
MATT SWALLOW
William,
I use this but it only shows who and the last time they used the console-

DECLARE @v1_TrusteeScope nvarchar(max)
SET @v1_TrusteeScope = N'%TrusteeScope%'
DECLARE @v2__LastNDays int
SET @v2__LastNDays = %LastNDays%

DECLARE @timeOffset INT
SELECT @timeOffset = DATEDIFF(MINUTE, GETUTCDATE(), GETDATE())

SELECT
[vAccount].[Guid],
[vAccount].[Name] AS [Account Name],
[dcaAccountDetails].[Email],
DATEADD(MINUTE,@timeOffset,[dcaAccountDetails].[LastLoginTime]) AS [Last Login Time]
FROM
[vRM_Account_Item] AS [vAccount]
LEFT OUTER JOIN [Inv_Account_Details] AS [dcaAccountDetails] ON ([vAccount].[Guid] = [dcaAccountDetails].[_ResourceGuid])
WHERE
(
(
(DATEDIFF(DAY, [dcaAccountDetails].[LastLoginTime], GETUTCDATE()) >= @v2__LastNDays)
OR
([dcaAccountDetails].[LastLoginTime] IS NULL)
)
AND
([vAccount].[Guid] IN (SELECT [ResourceGuid] FROM [ScopeMembership] WHERE [ScopeCollectionGuid] IN (SELECT [ScopeCollectionGuid] FROM dbo.fnGetTrusteeScopeCollections(@v1_TrusteeScope))))
)
ORDER BY
[Last Login Time],
[Account Name]
Igor Perevozchikov's profile image
Broadcom Employee Igor Perevozchikov

Hi William Yiing!

There is a default report "Accounts Last Login Time", but it shows only last successful logins and there is no information about failed logins and their reasons

Best regards,
IP.