The result of selecting a single property is an object with one property - if you output that, you’ll see something like
PS > [PSCustomObject]@{SamAccountName='jpruskin'}
SamAccountName
--------------
jpruskin
# If instead you expand the property, you will get the value within the property
PS > [PSCustomObject]@{SamAccountName='jpruskin'} | Select-Object -ExpandProperty samaccountname
jpruskin
You probably either want to reference the content of that property, or use -ExpandProperty to end up with just the strings in SamAccountName.