Skip to content

Commit 06f2350

Browse files
authored
Added RunAs Profile Display Name - Thank you Alex Kremenetskiy ☮️
1 parent 13ad79a commit 06f2350

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
--get all Run As profiles and associated accounts,
22
--credentials, Secure Storage ID values and targets
33
SELECT [Profile].SecureReferenceName ProfileName
4-
, Account.Name AccountName
5-
, Account.Domain
6-
, Account.UserName
7-
, Account.LastModified
8-
, [Override].OverrideName
9-
, [Override].Value SSID
10-
, bme.FullName
11-
, mt.TypeName
4+
    , lt.LTValue
5+
    , Account.Name AccountName
6+
    , Account.Domain
7+
    , Account.UserName
8+
    , Account.LastModified
9+
    , [Override].OverrideName
10+
    , [Override].Value SSID
11+
    , bme.FullName
12+
    , mt.TypeName
1213
FROM CredentialManagerSecureStorage AS Account WITH (NOLOCK)
1314
JOIN SecureReferenceOverride AS [Override] WITH (NOLOCK)
1415
ON CONVERT (varchar(80), Account.SecureStorageId, 2) = [Override].Value
@@ -18,4 +19,5 @@ JOIN ManagedType mt WITH (NOLOCK)
1819
ON [Override].TypeContext = mt.ManagedTypeId
1920
LEFT JOIN BaseManagedEntity bme WITH (NOLOCK)
2021
ON [Override].InstanceContext = bme.BaseManagedEntityId
21-
ORDER BY ProfileName
22+
join LocalizedText lt on lt.LTStringId = [Profile].SecureReferenceId and lt.LTStringType = 1
23+
ORDER BY ProfileName

0 commit comments

Comments
 (0)