Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(pam): show account type for AD accounts on Windows resource page

bernie-g1d439019e9fa
diff --git a/frontend/src/pages/pam/PamResourceByIDPage/components/PamResourceAccountsSection.tsx b/frontend/src/pages/pam/PamResourceByIDPage/components/PamResourceAccountsSection.tsx
index 283c2648f3..db285e7481 100644
--- a/frontend/src/pages/pam/PamResourceByIDPage/components/PamResourceAccountsSection.tsx
+++ b/frontend/src/pages/pam/PamResourceByIDPage/components/PamResourceAccountsSection.tsx
@@ -81,7 +81,9 @@ const hasAccountsWithDependencies = (resourceType: PamResourceType) =>
resourceType === PamResourceType.Windows;
const getAccountType = (account: TPamAccount): string | undefined => {
- if (account.resource?.resourceType === PamResourceType.Windows) {
+ // AD-domain accounts surfaced on a Windows resource page have
+ // account.resource === null but still carry internalMetadata.accountType.
+ if (account.resource?.resourceType === PamResourceType.Windows || account.domain) {
return (account as TWindowsAccount).internalMetadata?.accountType;
}
return undefined;