How to manage workspaces of the entire team in Visual Studio Team Services Online? - azure-devops

We have this VSTS online account, and we want to see a list of all mapped workspaces of all users in one place.
We know that we can go to each developer's PC and use tf.exe workspaces to get the list of workspaces on that machine.
But we need to do it without going to each developer's PC. The reason we need this is that we suspect some team members use their credentials and map a workspace on a machine outside our company's environment, without our permission.
Is there a way to see all mapped workspaces in one central place?

The easiest way is to use something like Attrice TFS Sidekicks. It should work with VSTS, even if it doesn't say it does.
However, the more permanent solution is to set up conditional access in your Azure AD. That allows you to add restrictions so that your users cannot log in from outside your network.

(I know it's an old post, but researching for my own purposes...)
Extrapolating off of how to remove TFS workspace mapping for another user
The following worked for me:
>tf.exe workspaces /collection:https://contoso.visualstudio.com/ /owner:*

Related

TFS Users Incorrect

I have just started working with a company that uses VS Team Services. They set me up with a user account and then pulled the code base to my local PC. Whenever I go to check-out/check-in a file, the username that appears is that of the administrator, not me. I'm not at all familiar with team services because I used git previously. I tried removing the existing workspace and then re-created it, making sure VS showed my username on the team connection settings, but this didn't change anything. I'm using VS 2010 currently.
Here are some screenshots
Checkout not me
And
TFS Connection showing me
First, make sure your personal account has been added to the team project you are working on. Check Add users to a team project.
Then, go to Team Explorer as the screenshot below, click Manage Connections or Select Team Projects (depends on the VS version), select the VSTS you are using, and click Switch User to use your own account:

log access to code repo in visual studio online

When using visual studio online, we want to ensure that contractors or developer working on project could only check-in and check-out using our given laptops.
Has anyone found a way to restrict access to code from a certain machines in Visual studio Online?
Can we somehow log who checked code out and from which machine at what time?
There is currently no way to restrict access to VSO by IP address. It is something we are considering. What you can do is to enable two-factor authentication in your Azure Active Directory tenant.
There's no way to currently log who has checked out code. The closest you could get would be to periodically query for the workspaces in the account if you are using TFVC. There's no way for you to track clones of Git repos.

Is it possible to manage different github account for different projects in android studio?

I am now using android studio to develop several applications.
And one of them exists in the repository of a different github account.
But, when I have two instance of android studio opened for two projects, and changed one github account in the VCS setting, the setting of the other instance also changed. which is quite inconvenient. For I want these two projects shared in different repo from different account.
Hope I made my point clearly. Anyone have some idea about that?
I guess you can simply use command line or terminal for any push or pull. Instead of using Android studio. If in case you do this way and SSH key is not configured you might be able to easily use two different account because it is just going to be varied remote

Is There A Way To Backup Visual Studio Team Services Projects?

I'm advocating using Visual Studio Team Services for our source control solution, and have actually started doing so. However, my manager, who is somewhat apprehensive when it comes to cloud-hosted storage and services, wants to know what our contingency plan is in the event of Team Services ceasing to be accessible for whatever reason.
I've pointed out that we have our source code on our developers' computers, in their mapped work spaces, but admittedly if we ended up with just that and no access to Team Services we'd certainly be in a bit of bind. They might all be working on different parts of the same solution and we wouldn't be able to check all of their changes back into the central repository or merge changes made in separate branches. We also wouldn't have access to the comments associated with previous check-ins, or our backlog, tests, etc.
So, the question is, is there a way to backup everything that we're hosting in Team Services so that, in the event of something going wrong, we'd be able to restore all of that to a locally-hosted installation of TFS (or somewhere else)?
I'm a bit late to the party but we developed a Team Services backup tool. We scheduled it as a scheduled task and it runs once a night. It then just clones all our repositories to disk.
Taken from this blog:
We use the VSO Rest API to query our VSO account and get all the data
we need. Since in VSO you can only have one Team Project Collection,
we retrieve all the team projects of the default collection. Each of
these team projects can have multiple repositories that need to be
backed up. A folder is created for each team project and saved to a
location on disk that can be configured in the app.config. When the
team project folder is created, the task loops over each repository in
the team project and creates folders for each repository.
You can also fork it on GitHub here
There's no out of the box backup ability.
Now, if you are only referring to source control, and not work items, pull requests, builds, test plans or anything else that the service offers, then I'd suggest you migrate your code over to git.
With git every developer will have a complete copy of the source repository, including all history and commit comments. From there, it's a simple task to push the git repository to a different git hoster (such as bitbucket or github) and make them your new centrally hosted git repository.
On a historical note, Visual Studio Team Services at one point offered a data export for a period of time. You might want to add a vote or three to this related UserVoice idea to help raise the importance of the feature with Microsoft.
Side comment: The business risks in using Visual Studio Team Services will come from either Microsoft shutting down the Visual Studio Team Services service or that the underlying Azure infrastructure has such a catastrophic failure that your Visual Studio Team Services account is unrecoverable. Both of those are extremely low risk, and very likely lower than the risks you'd have running TFS on-premises, in your own data centre, unless of course, your infrastructure and staff are better than Microsoft's :-)
Not a full VS backup in terms of a restore of service. But you can take a full Zip from root down using the Code web site. Right click the root folder and has a zip download option. Pretty neat feature.
The easiest way to back up everything is to use something like the TFS Integration Platform to periodically pull off all your data into an on-premises TFS solution. I've set this up using an Azure VM that we turned off when we weren't actively backing up, which makes it really low cost. For more info on using the TFS IP with Team Services, see this: http://nakedalm.com/migration-from-tf-service-to-tf-server-with-the-tfs-integration-platform/

Enable alternative credentials in TFS on premises

Using Visual Studio Team Services you have to enable Alternative Credentials in order to be able to connect to TFS Git Repo. using Eclipse or any other Git Client,
My problem is i want to connect to TFS on-premises Git repo. using Eclipse but there is no way to enable Alternative Credentials, any way to enable Alternative Credentials to be able to do that ? or can i do it other way?
TFS15 now supports Personal Access Tokens and SSH access, so your question isit's not entirely off the mark. There are scenario's where connecting using NTLM or kerberos security is not possible, but as #edward-thomson pointed out, the alternate credential is still linked to a domain account and should not be handed out to 3rd parties.
Instead users will need to be added to Active Directory, or a trust relation (or Federation) needs to be in place so the user is able to join using it's own orgs AD account.
If you're using Git, you could opt to also store the repository on Visual Studio Team Services and push/pull between that and your own TFS server. That way you can give 3rd parties access using their MSA or AAD account, while keeping the main repository secured using AD accounts only. Given the fact that Git is able to transfer data and history with ease, that's not an entirely weird scenario. It fits with the whole Distributed nature of Git quite well.