Public/Get-AssociateOID.ps1

function getAssociateOID {
    <#
    .SYNOPSIS
        Get a user's Associate ID from ADP
    
    .DESCRIPTION
        Get a user's Associate ID from ADP

    .PARAMETER ADPObject
        Object which holds the AssociateOID

    .EXAMPLE
        Input Object: ADP Object
        Return String: <Associate OID>
        
    .NOTES
        This is used when passing the full adp worker object from ADP's APID

    .LINK
        https://google.com

    .FUNCTIONALITY
        Powershell Language
    #>

    param (
        $ADPObject
    )
    $localAssociateOID = $null
    try {
        $localAssociateOID = $ADPObject.associateOID
    } catch {}

    return ( $localAssociateOID | Get-ValidADPReturn )
}