---
title: clsAccountMaintProxy
summary: API reference for clsAccountMaintProxy.
status: draft
owner: <owner>
last_reviewed: 2026-07-23
library: SAIF.Framework.Security
reference_type: package
---

# clsAccountMaintProxy

`clsAccountMaintProxy` is a proxy over the legacy ASMX `clsADServices` web reference. It provides account lookups, resource-access authorization checks (cached/external variants), and user-info retrieval for consuming applications that still use the legacy AD web service integration path.

## Purpose
- Delegate legacy resource-access authorization checks (`ResourceAccessValid*`) to the ASMX `clsADServices` web service.
- Provide account/user lookups (accounts by ID number, last logon date, ID number, payment password, full user info) via the same legacy service.
- Enumerate accounts with access to a given resource (`GetWhoHasAccess`).

## Context
- Namespace: `SAIF.Framework.Security`
- Assembly/package: `SAIF.BOF.Framework.Security` (bundled into the repository-wide `SAIF.BOF.Framework` NuGet package)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `GetAccountsByID` | `Function GetAccountsByID(ByVal IDNumber As String) As ArrayList` | Returns all accounts associated with an ID number via `clsADServices.GetAccountsByIDNumber`. |
| `GetLastLogonDate` | `Function GetLastLogonDate(ByVal mailid As String, ByVal domain As String) As Date` | Returns the last logon date for a mail ID/domain via `clsADServices.GetLastLogon`. |
| `GetIDNumber` | `Function GetIDNumber(mailid As String, domain As String) As String` | Returns the ID number for a mail ID/domain via `clsADServices.GetIDNumber`. |
| `GetPaymentPassword` | `Function GetPaymentPassword(mailid As String, domain As String) As String` | Returns the payment password for a mail ID/domain via `clsADServices.GetPaymentPassword`. |
| `SetPaymentPassword` | `Function SetPaymentPassword(ByVal mailid As String, ByVal domain As String, ByVal passwd As String) As Boolean` | Sets the payment password for a mail ID/domain via `clsADServices.SetPaymentPassword`. |
| `GetWhoHasAccess` | `Function GetWhoHasAccess(ByVal resourceName As String) As Array` | Enumerates accounts with access to `resourceName` (appends a plain `Test` suffix in non-production) via `clsADServices.WhoHasAccessCache`. Not counted as an authorization enforcement point — see [security and authorization](../../security-authorization.md#authorization-enforcement-points). |
| `ResourceAccessValid` | `Function ResourceAccessValid(ByVal mailid As String, ByVal resourcename As String) As Boolean` | Resource-access authorization check (appends `Test` suffix in non-production) via `clsADServices.HasAccess`. See [BR-002](../../business-rules.md#br-002-legacy-asmx-resource-checks-use-a-plain-test-suffix). |
| `ResourceAccessValidCached` | `Function ResourceAccessValidCached(ByVal mailid As String, ByVal resourcename As String) As Boolean` | Cached resource-access authorization check via `clsADServices.HasAccessCache`. See [BR-002](../../business-rules.md#br-002-legacy-asmx-resource-checks-use-a-plain-test-suffix). |
| `ResourceAccessValidExternal` | `Function ResourceAccessValidExternal(ByVal mailid As String, ByVal resourcename As String) As Boolean` | External-domain resource-access authorization check via `clsADServices.HasAccessExternal`. See [BR-002](../../business-rules.md#br-002-legacy-asmx-resource-checks-use-a-plain-test-suffix). |
| `ResourceAccessValidCachedExternal` | `Function ResourceAccessValidCachedExternal(ByVal mailid As String, ByVal resourcename As String) As Boolean` | Cached, external-domain resource-access authorization check via `clsADServices.HasAccessCacheExternal`. See [BR-002](../../business-rules.md#br-002-legacy-asmx-resource-checks-use-a-plain-test-suffix). |
| `GetUserInfo` | `Function GetUserInfo(ByVal mailid As String) As UserInfo` | Retrieves full directory user info for a mail ID via `clsADServices.GetUserInfo`. |
| `GetUserInfoExternal` | `Function GetUserInfoExternal(ByVal mailid As String) As UserInfo` | Retrieves full directory user info for an external-domain mail ID via `clsADServices.GetUserInfoExternal`. |

Additionally, this file defines the public `UserInfo` structure (address, email, name, department, and related directory attribute fields), used as the return type of `GetUserInfo`/`GetUserInfoExternal`.

## Behavioral notes
- All resource-access checks append a plain `Test` suffix to the resource name in non-production, which is an inconsistent naming convention relative to the WCF `SecurityService` path's `Resource`/`TestResource` suffixing. See [BR-002](../../business-rules.md#br-002-legacy-asmx-resource-checks-use-a-plain-test-suffix).
- The private `GetADService()` helper resolves the ASMX proxy's `Url` from the `legacyADServiceUrl` config setting on every call — no client instance is cached or reused.*

## Constraints and usage notes
- This class depends entirely on the legacy ASMX `clsADServices` web reference; it does not call the WCF `SecurityService` used by `clsSecurityPrincipal.IsAuthorized`/`IsInRole`.
- Callers must supply an already-suffixed or base resource name consistently with the plain `Test` suffix convention used by this class, not the `Resource`/`TestResource` convention used by the WCF path.

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts.

## Sources
- `SAIF.Framework.Security\clsAccountMaintProxy.vb`
