I've a repository hosted on VSTS, containig a file stored through git-lfs. If I just let VSTS build checkout the repository it just downloads the git-lfs metadata file containing the ID of the file.
Here's the output how VSTS gets its source:
Syncing repository: MyRepo (Git)
Checking out c84ef2f2bbad4fa3dc70dbd4100534390b9c8f18 to d:\work\73\s
Checked out branch refs/heads/develop for repository MyRepo at commit c84ef2f2bbad4fa3dc70dbd4100534390b9c8f18
git lfs fetch
VSTS has now an
Allow Scripts to Access OAuth Token option. With this option set on the build definition the OAuth is available to build scripts.
I've created an extension containing build tasks which change the remote Url to use the OAuth token to access the remote repository.