TFS: Exception calling "SetRight" with "2" argument(s): "Could not obtain the user information."
Please include the domain in the username variable. If it’s not domain environment, it should be the machine name.
So, just try to update the UPN user name format to DOMAIN\Username or MACHINENAME\Username format.