Skip to content

Instantly share code, notes, and snippets.

@akanieski
Created January 20, 2022 20:08
Show Gist options
  • Save akanieski/a701e58013e4094b479d1d2b29f5aba7 to your computer and use it in GitHub Desktop.
Save akanieski/a701e58013e4094b479d1d2b29f5aba7 to your computer and use it in GitHub Desktop.
Azure DevOps Server - SSH Key Count by User
select
count(1) as KeyCount,
id.DisplayName,
id.MailAddress
from
[dbo].[tbl_DelegatedAuthorizationAccessKey] as k
left join [dbo].[tbl_Identity] as id on k.IdentityId = id.Id
where
k.IsPublic = 1
group by
id.Id,
id.DisplayName,
id.MailAddress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment