1

I have a project at myname.visualstudio.com/MyTeam/MyProject. I added a contributor to my team, and they were previously able to clone the project. After upgrading to VS2017, myname.visualstudio.com no longer appears in the list of available servers when they click Manage Connections. They can see the code through the project's portal, but clicking on "Open in Visual Studio" results in a message box from Visual Studio saying "You are not allowed to access https://myname.visualstudio.com/defaultcollection". I don't know if it's expected that they should have access to my defaultcollection, since they only have permissions to see one of many projects.

Either way, if they can see the code in the portal, but cannot see it in Visual Studio, it seems like a bug.

I have verified that the same Microsoft Account is being used in both places. It happens to be inherited from the account used to log into Windows 10.

We've tried removing the login in VS then logging in again. It doesn't even ask for credentials due to inheriting from Windows 10.

I've tried removing their permissions to the project then reapplying.

They've tried adding my server address manually. That's not allowed, because you're supposed to select *.visualstudio.com domains from the automatically-populated list.

What next?

Hamish
  • 91
  • 1
  • 10
  • Does the user have View instance-level information permission? (https://XXX.visualstudio.com/_admin/_security) – starian chen-MSFT Sep 18 '17 at 06:09
  • I don't see any reference to "instance level information permission" but the user _is_ a member of the _MyProject_ group, which is itself a member of _ProjectValidUsers_, which is a member of _Project Collection Valid Users_. Is that not enough? It has been in the past. – Hamish Sep 19 '17 at 07:40
  • By default, the Project Collection Valid Users have `view instance-level information` permission, but you need to check whether the user permission has been explicit denied. (In collection admin page=>Type username in Filter users and groups box=>Select the user=>Check permissions) – starian chen-MSFT Sep 19 '17 at 07:56

2 Answers2

0

Usually if team members has permission to view/edit code in a certain team, they can clone/modify the repo. So you can use another way have a try:

  • First, please let the contributor login your team project (MyProject) with his own account. And make sure the contributor can access MyProject in portal.
  • Then clone the repo for MyProject directly in VS2017:

    VS2017 -> Team explorer -> Manage connections -> connect to project -> select/add the contributor’s email address/account -> select your VSTS account (myname.visualstudio.com) -> select your team project (MyProject) -> select the repo under MyProject -> Clone (or connect for TFVC repo).

    enter image description here enter image description here

Then the repo is cloned/connected.

Marina Liu
  • 32,805
  • 4
  • 48
  • 60
  • Thanks for your reply. The contributor can definitely see the code in the portal. They cannot see my VSTS account in their list. The only entry is their own VSTS address (contributor.visualstudio.com), which has a warning triangle because it does not contain any projects. – Hamish Sep 14 '17 at 06:24
  • The contributor should directly go to `https://myname.visualstudio.com` (not `contributor.visualstudio.com`), then the contributor should enter his email address and password to login your team project. – Marina Liu Sep 14 '17 at 06:27
  • Does the contributor can clone the repo hosted on your VSTS account now? – Marina Liu Sep 19 '17 at 02:23
  • Sorry, took a long time to get them to try this. I can confirm that the contributor sees the same as me on that landing page, except for the repositories to which they don't have access. It turned out that using 'devenv /resetuserdata' and logging in again helped. I guess it is user accounts bug caused by upgrading VS. – Hamish Sep 30 '17 at 00:08
0

It turns out that there was no problem with the repository or its permissions. It was purely a bug in VS 2017, probably triggered by upgrading. Even though it thought it was logged in, it didn't seem to have the token required to access the VSTS repository.

The solution came from this thread:

  1. Close VS then start the VS Developer Command prompt as an administrator. Then enter: devenv /resetuserdata. This effectively logs out of the Microsoft Account.
  2. Log in to https://myname.visualstudio.com using the Visual Studio built-in browser (Ctrl+Alt+R)
Hamish
  • 91
  • 1
  • 10